Skip to content

Commit

Permalink
Use GraphQL Config for GraphQL Codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Mar 31, 2022
1 parent 259b3c6 commit 74daeb6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .graphqlrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema: ./graphql/schema/schema.graphql
documents: ./app/**/*.{graphql,js,ts,jsx,tsx}
extensions:
codegen:
generates:
./app/gql:
preset: gql-tag-operations-preset
hooks:
afterOneFileWrite:
- prettier --write
12 changes: 0 additions & 12 deletions codegen.yml

This file was deleted.

4 changes: 0 additions & 4 deletions graphql.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"scripts": {
"prepare": "husky install",
"codegen": "graphql-codegen --config codegen.yml",
"codegen": "graphql-codegen",
"codegen:fetch": "node --no-warnings scripts/fetchGraphQLSchema ",
"codegen:watch": "yarn run codegen -- --watch"
}
Expand Down

0 comments on commit 74daeb6

Please sign in to comment.