Skip to content

Commit 74daeb6

Browse files
committed
Use GraphQL Config for GraphQL Codegen
1 parent 259b3c6 commit 74daeb6

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

.graphqlrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
schema: ./graphql/schema/schema.graphql
2+
documents: ./app/**/*.{graphql,js,ts,jsx,tsx}
3+
extensions:
4+
codegen:
5+
generates:
6+
./app/gql:
7+
preset: gql-tag-operations-preset
8+
hooks:
9+
afterOneFileWrite:
10+
- prettier --write

codegen.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

graphql.config.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"scripts": {
2121
"prepare": "husky install",
22-
"codegen": "graphql-codegen --config codegen.yml",
22+
"codegen": "graphql-codegen",
2323
"codegen:fetch": "node --no-warnings scripts/fetchGraphQLSchema ",
2424
"codegen:watch": "yarn run codegen -- --watch"
2525
}

0 commit comments

Comments
 (0)