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

Fed v2 version hardcoded into URL for FederatedSchema #22

Closed
blegrosvoalte opened this issue Oct 18, 2023 · 3 comments
Closed

Fed v2 version hardcoded into URL for FederatedSchema #22

blegrosvoalte opened this issue Oct 18, 2023 · 3 comments

Comments

@blegrosvoalte
Copy link

We're getting the following ever from Rover when trying to publish to a variant that supports Federation v2.4:

UNKNOWN_FEDERATION_LINK_VERSION: [directory] Invalid version v2.5 for the federation feature in @link direction on schema

Looks like the Federation version is hardcoded into the URL @ https://github.com/apollographql/federation-hotchocolate/blob/main/src/Federation/Two/FederatedSchema.cs#L10:

/// <summary>
/// Apollo Federation v2 base schema object that allows users to apply custom schema directives (e.g. @composeDirective)
/// </summary>
[Link("https://specs.apollo.dev/federation/v2.5", new string[] {
                "@composeDirective",
                "@extends",
                "@external",
                "@key",
                "@inaccessible",
                "@interfaceObject",
                "@override",
                "@provides",
                "@requires",
                "@shareable",
                "@tag",
                "FieldSet"
})]

Since the schema version is specified per variant in Apollo Studio, can we get this to be an argument to the .AddApolloFederationV2() method? For example, right now we're running Router 1.19.0 which only supports Fed v2.4, so being able to specify something like the below would be helpful:

...

builder.Services
   .AddGraphQLServer()
   .AddApolloFederationV2('2.4')
   ...
...

Thoughts?

@dariuszkuc
Copy link
Member

Hello 👋
I've updated FederatedSchema to accept federation version parameter (#23). Ideally we should support full @link capabilities (#24) but that is a much bigger change....

@blegrosvoalte
Copy link
Author

Thanks for the quick turnaround @dariuszkuc ! Appreciate the help.

@dariuszkuc
Copy link
Member

👋 I forgot to add extension as well -> #32

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

No branches or pull requests

2 participants