Skip to content
Discussion options

You must be logged in to vote

I found a solution to the issue.

Split my codegen.ts generates into 2 separate sections:

const config: CodegenConfig = {
  overwrite: true,
  debug: false,
  verbose: false,
  emitLegacyCommonJSImports: false,
  documents: ["src/data/**/*.graphql"],
  config: {
    preResolveTypes: true,
  },
  generates: {
    "./src/types/generated-types.ts": {
      schema: [
        "https://example.com/graphql/",
        "./src/apolloClient/client-schema.graphql",
      ],
      plugins: [
        "typescript",
        "typescript-operations",
        "typescript-apollo-client-helpers",
      ],
      config: {
        preResolveTypes: true,
        /**This will prevent Apollo errors on dublicate fra…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by charlypoly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant