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 16.9.0 #2049

Open
hinogi opened this issue Aug 14, 2024 · 5 comments
Open

Incompatibility with graphql 16.9.0 #2049

hinogi opened this issue Aug 14, 2024 · 5 comments
Labels
bug 🐞 triage issues and PRs that need to be triaged

Comments

@hinogi
Copy link

hinogi commented Aug 14, 2024

Description

@oneOf is not recognized as a known directive by rover

Steps to reproduce

try to compose a supergraph with a @oneOf directive in use without declaring the directive

Expected result

@oneOf should be known as an internal directive of graphql

Actual result

error[E029]: Encountered X build errors while trying to build a supergraph

Caused by:
UNKNOWN: [...] Unknown directive "@oneOf"

Environment

Run rover info and paste the results here

version: 0.25.0
OS: Windows 10
Shell: PowerShell

@hinogi hinogi added bug 🐞 triage issues and PRs that need to be triaged labels Aug 14, 2024
@LongLiveCHIEF
Copy link
Contributor

Normally, I'd say that this should be implemented using custom directives (also see managing custom directives. Current the @oneOF is an RFC, and not part of the official spec for graphql built-in directives. However, since it is in rfc, and many graphql tools have already implemented it, then it may be a good idea to open this as an issue in the https://github.com/apollographql/federation-rs project, which is where the plugin rover uses to compose schema comes from.

@hinogi
Copy link
Author

hinogi commented Aug 15, 2024

https://github.com/graphql/graphql-js/releases/tag/v16.9.0

I guess all node based packages lean on graphql-js as source of truth maybe there has been no rust update of that. So having different source of truths may cause such problems.
So tools like graphql codegen will filter out that directive since it is now treated as build in. And since rover does not support globs like **/*.graphql to stich together modularized graphql files this is a huge thing.

@hinogi
Copy link
Author

hinogi commented Aug 15, 2024

Wait I was saying is, for JS ppl it is a build in directive while for RS ppl it might not be

@LongLiveCHIEF
Copy link
Contributor

LongLiveCHIEF commented Aug 15, 2024

I'm not disputing any of that. All I'm saying is that rover isn't involved at all in the parsing or composition of the graphql, and that the issue will be more likely to be resolved if you open it in the project where this feature needs to be implemented.

(and also that you can extend it in schema until it is natively supported, since your server and client side libraries already support it.)

@jonathanrainer
Copy link
Contributor

Hi, thanks for raising this, we're working on supporting this in both the supergraph plugin and the router, you can follow this issue here: apollographql/apollo-rs#882. Once that has merged and new versions of supergraph and router are available we'll update rover to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 triage issues and PRs that need to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants