Skip to content

Commit

Permalink
feat: add snippets for graphql + typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
quangvo09 committed Nov 19, 2023
1 parent 65794ad commit cd6035c
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -80,6 +80,10 @@
{
"language": "python",
"path": "snippets/python.snippets.json"
},
{
"language": "typescript",
"path": "snippets/typescript.snippets.json"
}
],
"keybindings": [
21 changes: 21 additions & 0 deletions snippets/typescript.snippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"BoostCode: Resolver": {
"prefix": ["GraplQL resolvers", "grs"],
"body": [
"const resolvers = {",
" ${1|Query,Mutation,Subscription|}: {",
" ${2:functionName}: async (",
" _parent: unknown,",
" args: ${3|unknown|},",
" context: ${4|unknown|}",
" ): Promise<${5|any|}> => {",
" $0",
" },",
" },",
"};",
"",
"export default resolvers;"
],
"description": "GraplQL resolvers"
}
}

0 comments on commit cd6035c

Please sign in to comment.