updated codegen, added client query generation, etc.
This commit is contained in:
parent
864f37a652
commit
9518787206
17 changed files with 5244 additions and 445 deletions
24
codegen.ts
24
codegen.ts
|
|
@ -1,19 +1,25 @@
|
|||
import type { CodegenConfig } from "@graphql-codegen/cli";
|
||||
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||
|
||||
const config: CodegenConfig = {
|
||||
overwrite: true,
|
||||
schema: "./app/server/graphql/schema.graphql",
|
||||
documents: "./app/client/fragments.ts",
|
||||
schema: './app/server/graphql/schema.graphql',
|
||||
documents: ['app/client/fragments', 'app/client/**/*.tsx'],
|
||||
generates: {
|
||||
"./__generated__/": {
|
||||
preset: "client",
|
||||
plugins: ["typescript", "typescript-resolvers"],
|
||||
'./__generated__/': {
|
||||
preset: 'client',
|
||||
presetConfig: {
|
||||
gqlTagName: 'gql'
|
||||
},
|
||||
plugins: ['typescript', 'typescript-resolvers']
|
||||
},
|
||||
"./graphql.schema.json": {
|
||||
plugins: ["introspection"],
|
||||
'./__generated__/types.ts': {
|
||||
plugins: ['typescript', 'typescript-operations']
|
||||
},
|
||||
'./graphql.schema.json': {
|
||||
plugins: ['introspection']
|
||||
}
|
||||
},
|
||||
ignoreNoDocuments: true,
|
||||
ignoreNoDocuments: true
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue