Skip to content

feat: support GraphQL Code Generator 7 and modern Vite/graphql majors#8

Open
smolinari wants to merge 1 commit into
dreamonkey:mainfrom
m8a-io:feat/support-graphql-codegen-7
Open

feat: support GraphQL Code Generator 7 and modern Vite/graphql majors#8
smolinari wants to merge 1 commit into
dreamonkey:mainfrom
m8a-io:feat/support-graphql-codegen-7

Conversation

@smolinari

Copy link
Copy Markdown

Widen peer ranges across all three packages and release 0.2.0 so they work with the @graphql-codegen v5/v6/v7-era plugins, Vite 5-8 and @graphql-codegen/core 6.

codegen-plugin (vue-apollo):

  • export plugin as a named export (not only via the default object). codegen 7 loads custom plugins via ESM import, which only sees named/default exports of this "type": "module" package; a default-only export fails with does not export a valid JS object with "plugin" function.
  • fix graphql-16 enum-comparison type errors by comparing against Kind / OperationTypeNode constants instead of string literals.
  • widen peers: @graphql-codegen/typescript & typescript-operations to ^6, near-operation-file-preset to ^5, typed-document-node to ^6/^7; allow @graphql-codegen/plugin-helpers ^7.

near-operation-file:

  • widen vite peer to include ^5, ^6, ^7, ^8.

vue-query-block:

  • widen @graphql-codegen/core peer to ^5/^6 and vite peer to ^5-^8.

Widen peer ranges across all three packages and release 0.2.0 so they work
with the @graphql-codegen v5/v6/v7-era plugins, Vite 5-8 and @graphql-codegen/core 6.

codegen-plugin (vue-apollo):
- export `plugin` as a named export (not only via the default object). codegen 7
  loads custom plugins via ESM `import`, which only sees named/default exports of
  this "type": "module" package; a default-only export fails with
  `does not export a valid JS object with "plugin" function`.
- fix graphql-16 enum-comparison type errors by comparing against Kind /
  OperationTypeNode constants instead of string literals.
- widen peers: @graphql-codegen/typescript & typescript-operations to ^6,
  near-operation-file-preset to ^5, typed-document-node to ^6/^7; allow
  @graphql-codegen/plugin-helpers ^7.

near-operation-file:
- widen vite peer to include ^5, ^6, ^7, ^8.

vue-query-block:
- widen @graphql-codegen/core peer to ^5/^6 and vite peer to ^5-^8.
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 this pull request may close these issues.

1 participant