Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
feat(graphql): codegen.ts to use printSchemaWithDirectives
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Mar 21, 2024
1 parent 431165b commit 842462a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { plugin as typescriptOperationsPlugin } from '@graphql-codegen/typescrip
import type { TypeScriptPluginConfig } from '@graphql-codegen/typescript'
import type { TypeScriptTypedDocumentNodesConfig } from '@graphql-codegen/typed-document-node'
import { plugin as typedDocumentNode } from '@graphql-codegen/typed-document-node'
import { printSchemaWithDirectives } from '@graphql-tools/utils'
import type { Source } from '@graphql-tools/utils'
import * as typescriptPlugin from '@graphql-codegen/typescript'
import * as typescriptResolversPlugin from '@graphql-codegen/typescript-resolvers'
Expand Down Expand Up @@ -127,7 +128,7 @@ async function typescriptResolvers(
// See https://www.graphql-code-generator.com/docs/getting-started/programmatic-usage for more details
const res = await codegen({
filename: '',
schema: parse(printSchema(schema)),
schema: parse(printSchemaWithDirectives(schema)),
// TODO: Add support for fragments
documents: [],
config: mergeConfig,
Expand Down

0 comments on commit 842462a

Please sign in to comment.