near-operation-file preset depends on relay-compiler@12, which doesn't support GraphQL 16
See original GitHub issueHi.
The latest releases of GraphQL code generator packages added GraphQL 16 support. But near-operation-file preset depends on relay-compiler@12, which doesn’t support GraphQL 16:
@graphql-codegen/near-operation-file-preset@2.2.3 > @graphql-codegen/visitor-plugin-common@2.5.2 > @graphql-tools/relay-operation-optimizer@6.4.1 > relay-compiler@12.0.0
According to https://github.com/facebook/relay/issues/3705 and https://github.com/ardatan/graphql-tools/issues/4070 I see, that GraphQL 16 support for near-operation-file preset is a complex feature, since the new relay-compiler@13 migrated to Rust and @graphql-tools/relay-operation-optimizer can’t work with it like it did before.
Are there any plans to add GraphQL 16 support for near-operation-file preset in the nearest future?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:5
Top Results From Across the Web
@graphql-codegen/near-operation-file-preset - npm
GraphQL Code Generator preset for generating operation code near the operation file. Latest version: 2.4.4, last published: a month ago.
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
This packaging structure means that new integration package releases are lockstep versioned to Apollo Server itself, making it challenging to support major ...
Read more >relay-compiler 12 + graphql 16 = Invalid AST Node
The answer is no, relay-compiler is not yet ready to use graphql 16. See https://github.com/facebook/relay/issues/3622.
Read more >client-preset - GraphQL Code Generator
The client-preset provides typed GraphQL operations (Query, Mutation and Subscription) by perfectly integrating with your favorite GraphQL ...
Read more >What are the advantages of using "near-operation-file ... - Reddit
Hi everyone, in my current react project (NX monorepo, 3 different apps), I'm heavily using graphQL for API communication (apollo + codegen) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

this should have been fixed with the latest version of graphql-tools: https://github.com/ardatan/graphql-tools/discussions/4070#discussioncomment-2915012
I am curious why this preset says it’s compatible with GraphQL 16 despite the underlying dependency chain not supporting GraphQL 16.
I didn’t see any specific problems after the upgrade, but I am a bit wary of using
relay-compiler@12withgraphql@16when its own devs say it’s not compatible.