Open vitomanuguerrasoft opened 1 week ago
Same issue here.
Hello 👋
In fed v2 this scalar was renamed from _FieldSet
to just FieldSet
. We distinguish between v1 and v2 schemas by the presence of the @link
directive that imports federation spec.
Based on the error I'm guessing you are not specifying the @link
directive?
@dariuszkuc yes I have no link in my schema.graphql, how should it be defined?
In order to explicitly opt-in to fed v2 as a subgraph you need to add @link
on the schema that links to a target federation version and can optionally imports some of the definitions (if you don't import those directives then they can still be used within your schema but they will have to be namespaced). See docs.
That being said, I am unsure what sort of compatibility SmallRye GraphQL
offers as we don't have their example integration in our compatibility test repo. You can see the latest compatibility results here. I see there is an open issue to add example integration to test repo but that still hasn't happened. There is also an open issue around @link
handling so I am unsure whether you can generate Fed v2 subgraphs using smallrye implementation.
I'm using the following versions:
federation_version: 2.9.0 rover: 0.26.2 router: 1.54.0
When running the command:
rover supergraph compose --config ./supergraph-config.yaml
I encounter this error:
For context, I'm generating my schema from a Quarkus application (3.14.2) using Smallrye GraphQL 2.9.2. According to the federation v2 documentation, it seems that the correct way to define FieldSet is without the underscore.