Skip to content

Commit

Permalink
graphql schema codegen using @graphql-codegen/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalabbad committed Jan 23, 2025
1 parent 4c46a97 commit 77f2ff8
Show file tree
Hide file tree
Showing 6 changed files with 5,373 additions and 639 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ jobs:
node-version: 20
cache: 'npm'
cache-dependency-path: ./package-lock.json
- name: "Install format-graphql"
- name: Install GraphQL Codegen dependencies
run: npm install

- name: Select infrahub db port
Expand Down
15 changes: 15 additions & 0 deletions graphql.codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: "http://localhost:8000/graphql",
generates: {
"./schema/schema.graphql": {
plugins: ["schema-ast"],
config: {
includeDirectives: true
}
}
},
};

export default config;
Loading

0 comments on commit 77f2ff8

Please sign in to comment.