feat: add graphql

This commit is contained in:
Zotov Ivan Yuryevich
2026-04-05 23:47:29 +03:00
parent 4b196e3d0e
commit 8b100c18b7
13 changed files with 6246 additions and 1 deletions

35
graphql.config.yml Normal file
View File

@@ -0,0 +1,35 @@
# GraphQL Config: one file for the IDE (vscode-graphql) and GraphQL Code Generator.
# - default: IntelliSense + generated TS (uses committed schema.graphql).
# - introspect: refresh schema.graphql from Strapi (needs Strapi up): npm run graphql:schema
projects:
default:
schema: ./schema.graphql
documents: ./src/**/*.gql.ts
extensions:
codegen:
ignoreNoDocuments: true
generates:
# Same as client-preset graphql.ts output, without gql.ts (gql-tag map / gen-dts).
src/graphql/graphql.ts:
plugins:
- add:
content: "/* eslint-disable */"
- typescript:
inputMaybeValue: T | null | undefined
- typescript-operations: {}
- typed-document-node: {}
config:
useTypeImports: true
documentMode: string
introspect:
schema: http://localhost:1337/graphql
documents: ./src/**/*.gql.ts
extensions:
codegen:
ignoreNoDocuments: true
generates:
./schema.graphql:
plugins:
- schema-ast