Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with @graphql-codegen/cli version 3 and above #10

Closed
Brookke opened this issue Jul 13, 2023 · 0 comments · Fixed by #11
Closed

Incompatibility with @graphql-codegen/cli version 3 and above #10

Brookke opened this issue Jul 13, 2023 · 0 comments · Fixed by #11

Comments

@Brookke
Copy link
Contributor

Brookke commented Jul 13, 2023

I recently tried updating a project that uses this plugin, however found that it did not work with the latest @graphql-codegen/cli version or anything above 3.0.0.

I get the following error:

✖ Invalid Codegen Configuration!
  Please make sure that your codegen config file has defined plugins list for output "dist/persisted_queri…
  It should looks like that:
  schema:
  - my-schema.graphql
  generates:
  my-file.ts:
  - plugin1
  - plugin2
  - plugin3
◼ Generate outputs

The config I am using is as follows

schema: "../../data/schema.graphql"
generates:
  gen/client.tsx:
    plugins:
      - add:
          content: "/* DO NOT EDIT! This file is auto-generated by graphql-code-generator - see `codegen.yml` */"
      - "typescript"
      - "typescript-operations"
      - "typescript-react-apollo"

  dist/persisted_queries/client.json:
    - graphql-codegen-persisted-query-ids:
        output: client
        algorithm: sha256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant