You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is to note some inconsistencies between the @link spec text and the existing implementations (in particular, in @apollo/federation).
I'm not proposing immediate action, but I think it will be a helpful reference to have these differences explicitly written down.
URL-ness -- according to the spec, @link(url:) can be a string that is not a valid URL:
If url: is not a valid RFC 3986 url, then it MUST be treated as an opaque identifier for the foreign schema. Such non-URL inputs to url: SHOULD NOT have name and version information extracted from them—both are {null}.
@apollo/federation does not accept non-URL values.
Optional name and version -- the spec says a name and version MAY be provided in @link(url:). @apollo/federation requires both.
Name syntax -- the spec says a spec name in @link(url:) MUST be a valid GraphQL name (if it exists). @apollo/federation does not enforce this, and happily parses invalid names. In practice this doesn't affect the behaviour much, as users cannot write definitions for namespaced elements where the namespace is invalid, so it just means that everything has to be explicitly imported or aliased.
The text was updated successfully, but these errors were encountered:
This is to note some inconsistencies between the
@link
spec text and the existing implementations (in particular, in@apollo/federation
).I'm not proposing immediate action, but I think it will be a helpful reference to have these differences explicitly written down.
URL-ness -- according to the spec,
@link(url:)
can be a string that is not a valid URL:@apollo/federation
does not accept non-URL values.Optional name and version -- the spec says a name and version MAY be provided in
@link(url:)
.@apollo/federation
requires both.Name syntax -- the spec says a spec name in
@link(url:)
MUST be a valid GraphQL name (if it exists).@apollo/federation
does not enforce this, and happily parses invalid names. In practice this doesn't affect the behaviour much, as users cannot write definitions for namespaced elements where the namespace is invalid, so it just means that everything has to be explicitly imported or aliased.The text was updated successfully, but these errors were encountered: