-
Notifications
You must be signed in to change notification settings - Fork 23
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
Set supportedFeatures
appropriately when calling Supergraph.build()
.
#403
Set supportedFeatures
appropriately when calling Supergraph.build()
.
#403
Conversation
@trevor-scheer @clenfest For some reason, we're getting this error while compiling
Have any of y'all seen this before? |
this is likely the same issue apollographql/router#3684 |
@sachindshinde the v8 build error is fixed now with #404 |
REQUIRES_SCOPES_VERSIONS, | ||
} from "@apollo/federation-internals"; | ||
|
||
const authenticatedV01Feature = AUTHENTICATED_VERSIONS.find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in fedutil-libs. I think we'd always just want the latest, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clenfest Presumably if we have multiple versions for a given identity (e.g. v0.1
and v0.2
), we'd want all of them instead of the latest. (Or at least, we'd want Supergraph.build()
to be able to parse older versions to enable in-place upgrades.) There's not a public accessor for FeaturesDefinitions._definitions
unfortunately, but we have FeatureDefinitions.versions()
, so I've updated the PR to use that.
0a8d470
to
6ef4f11
Compare
Router supports the
authenticated
v0.1 spec and therequiresScopes
v0.1 spec, but these aren't included in the default specs used bySupergraph.build()
(i.e.DEFAULT_SUPPORTED_SUPERGRAPH_FEATURES
), so usages of these specs cause errors.This PR changes the
supportedFeatures
passed toSupergraph.build()
to include'https://specs.apollo.dev/authenticated/v0.1'
and'https://specs.apollo.dev/requiresScopes/v0.1'
in addition to the default specs.