Skip to content

Commit 9f97945

Browse files
committed
create - codegen.yml
1 parent 97538f0 commit 9f97945

File tree

3 files changed

+390
-44
lines changed

3 files changed

+390
-44
lines changed

codegen.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
overwrite: true
2+
schema: "app/javascript/graphql/schema.graphql"
3+
documents: "app/javascript/**/*.tsx"
4+
generates:
5+
app/javascript/graphql/types.tsx:
6+
plugins:
7+
- "typescript"
8+
- "typescript-operations"
9+
- "typescript-react-apollo"

package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@
1919
},
2020
"version": "0.1.0",
2121
"devDependencies": {
22-
"@graphql-codegen/cli": "^2.6.2",
22+
"@graphql-codegen/cli": "2.6.2",
2323
"@types/react": "^17.0.39",
24-
"webpack-dev-server": "^3"
24+
"webpack-dev-server": "^3",
25+
"@graphql-codegen/typescript": "2.4.5",
26+
"@graphql-codegen/typescript-operations": "2.3.2",
27+
"@graphql-codegen/typescript-react-apollo": "3.2.8"
28+
},
29+
"scripts": {
30+
"gql:codegen": "graphql-codegen --config codegen.yml"
2531
}
26-
}
32+
}

0 commit comments

Comments
 (0)