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

New Plugin system breaks GraphQL code generation #842

Closed
mephinet opened this issue Aug 9, 2019 · 1 comment · Fixed by #843
Closed

New Plugin system breaks GraphQL code generation #842

mephinet opened this issue Aug 9, 2019 · 1 comment · Fixed by #843
Assignees

Comments

@mephinet
Copy link
Contributor

mephinet commented Aug 9, 2019

When using https://graphql-code-generator.com, the execution of all plugins I tested (typescript, fragment-matcher, introspection) fails with:

Type PluginAPIType must define one or more fields.

This only happens with Mesh v. 0.37.x and 0.38.0 - with 0.36.8, codegeneration works fine - so it's probably caused by the new plugin system that was introduced with 0.37.0...

Seen with "@graphql-codegen/cli@^1.5.0" with this codegen.yaml:

schema:
 - http://localhost:8080/api/v2/.../graphql:
    headers:
      Authorization: Bearer  ...
generates:
  src/generated/fragmentTypes.json:
    plugins:
      - fragment-matcher
  src/generated/graphql.ts:
    plugins:
      - "typescript"
      - "fragment-matcher"

when executing graphql-codegen --config codegen.yml.

@Jotschi
Copy link
Contributor

Jotschi commented Aug 9, 2019

That should be easy to fix. We'll just omit the pluginApi field if there are no plugins to access.

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.

2 participants