File tree Expand file tree Collapse file tree
examples/codegen-integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Examples Integration
2+ on :
3+ pull_request :
4+ branches : [ main, v1 ]
5+ paths :
6+ - ' examples/**'
7+ - ' graphql/codegen/**'
8+ workflow_dispatch :
9+
10+ jobs :
11+ examples-types :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : ' 20'
18+ - uses : pnpm/action-setup@v2
19+ with :
20+ version : 10
21+ - run : pnpm install
22+ - run : pnpm -r --filter @constructive-io/examples-codegen-integration run test:types
Original file line number Diff line number Diff line change @@ -6,9 +6,6 @@ name: Notify E2E Tests
66on :
77 push :
88 branches : [main]
9- paths-ignore :
10- - ' graphql/test-app/**'
11- - ' graphql/test-codegen-app/**'
129
1310jobs :
1411 trigger-tests :
Original file line number Diff line number Diff line change 44 branches :
55 - main
66 - v1
7- paths-ignore :
8- - ' graphql/test-app/**'
9- - ' graphql/test-codegen-app/**'
107 pull_request :
118 branches :
129 - main
1310 - v1
14- paths-ignore :
15- - ' graphql/test-app/**'
16- - ' graphql/test-codegen-app/**'
1711 workflow_dispatch :
1812 workflow_call :
1913
@@ -197,7 +191,7 @@ jobs:
197191
198192 - name : build
199193 run : |
200- pnpm -r --filter '!@constructive-io/test-codegen-app ' run build
194+ pnpm -r --filter '!./examples/** ' run build
201195
202196 - name : seed app_user
203197 run : |
Original file line number Diff line number Diff line change 1+ import { defineConfig } from "@constructive-io/graphql-codegen" ;
2+
3+ export default defineConfig ( {
4+ endpoint : "http://example.local/graphql" , // not used for fixture run
5+ output : "src/generated" ,
6+ reactQuery : true ,
7+ orm : true ,
8+ codegen : {
9+ maxFieldDepth : 2 ,
10+ skipQueryField : true
11+ } ,
12+ // Use the example schema fixtures baked into the repo
13+ schemaFile : "../../graphql/codegen/examples/example.schema.graphql"
14+ } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @constructive-io/examples-codegen-integration" ,
3+ "version" : " 0.0.0" ,
4+ "private" : true ,
5+ "type" : " module" ,
6+ "scripts" : {
7+ "codegen" : " tsx ../../graphql/codegen/src/cli/index.ts --config codegen.config.ts" ,
8+ "test:types" : " pnpm run codegen && tsc --noEmit"
9+ },
10+ "dependencies" : {
11+ "graphql" : " 15.10.1"
12+ },
13+ "devDependencies" : {
14+ "@constructive-io/graphql-codegen" : " workspace:^" ,
15+ "@constructive-io/graphql-types" : " workspace:^" ,
16+ "tsx" : " ^4.20.3" ,
17+ "typescript" : " ^5.1.6"
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ // Placeholder file so tsc has something to include
2+ export { } ;
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " ES2022" ,
4+ "module" : " ESNext" ,
5+ "moduleResolution" : " Bundler" ,
6+ "strict" : true ,
7+ "jsx" : " react-jsx" ,
8+ "skipLibCheck" : true ,
9+ "noEmit" : true ,
10+ "baseUrl" : " ." ,
11+ "paths" : {}
12+ },
13+ "include" : [" src" , " codegen.config.ts" ]
14+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ packages:
22 - ' packages/*'
33 - ' pgpm/*'
44 - ' graphql/*'
5+ - ' examples/*'
56 - ' uploads/*'
67 - ' postgres/*'
78 - ' graphile/*'
You can’t perform that action at this time.
0 commit comments