question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

near-operation-file preset depends on relay-compiler@12, which doesn't support GraphQL 16

See original GitHub issue

Hi.

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:closed
  • Created 2 years ago
  • Reactions:15
  • Comments:5

github_iconTop GitHub Comments

2reactions
Urigocommented, Jul 2, 2022

this should have been fixed with the latest version of graphql-tools: https://github.com/ardatan/graphql-tools/discussions/4070#discussioncomment-2915012

1reaction
aaronadamsCAcommented, Feb 11, 2022

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@12 with graphql@16 when its own devs say it’s not compatible.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found