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
Hey friend, thanks for sharing your code...
Im having the folowing issue:
Directive "external" already exists in the schema. It cannot be redefined.
Directive "requires" already exists in the schema. It cannot be redefined.
Directive "provides" already exists in the schema. It cannot be redefined.
Directive "key" already exists in the schema. It cannot be redefined.
Directive "extends" already exists in the schema. It cannot be redefined.
Any idea?
The text was updated successfully, but these errors were encountered:
Here's a quick workaround that's working for me...
Add the following to your schema:
type Query {
… other stuff in your query root here
_service: _Service!
}
type _Service {
sdl: String
}
Remove your call to $federation->extendSchema but leave the one for addResolversToRootValue
Explanation:
The Apollo docs are a bit unclear on this, but the _service query is meant to return your service definition without additional directives declared:
This SDL does not include the additions of the federation spec above.
The extendSchema function adds all that stuff to the schema (which is correct), but then the resolver for _service returns the full schema unmodified, so Apollo gets upset that you didn't strip that stuff out before generating the SDL
Hey friend, thanks for sharing your code...
Im having the folowing issue:
Any idea?
The text was updated successfully, but these errors were encountered: