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
Sorry for the confusing title but I didn't know how to describe what I am looking for.
In all of the examples/documentation that I have read it seems that a type is extended with additional information in the service that provides that information. For example, in dgs-federation-example the Review subgraph extends the Show subgraph and the resolver is in the Review app. What I am trying to figure out is how to do the reverse. Say I had a Location subgraph/app and I wanted to extend the Show subgraph with information on where the show took place. I don't want to have the Location app know anything about shows since its a generic app that can be used by dozens of different apps, but I am not sure how to resolve the location information in the Show app.
Here are the example schemas:
show.graphqls type Show @key(fields: "id") { id: ID title: String releaseYear: Int locatedIn: Locaion } type Location @key(fields: "id") @extends { id: ID @external }
location.graphqls type Location @key(fields: "id") { id: ID name: String }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry for the confusing title but I didn't know how to describe what I am looking for.
In all of the examples/documentation that I have read it seems that a type is extended with additional information in the service that provides that information. For example, in dgs-federation-example the Review subgraph extends the Show subgraph and the resolver is in the Review app. What I am trying to figure out is how to do the reverse. Say I had a Location subgraph/app and I wanted to extend the Show subgraph with information on where the show took place. I don't want to have the Location app know anything about shows since its a generic app that can be used by dozens of different apps, but I am not sure how to resolve the location information in the Show app.
Here are the example schemas:
show.graphqls
type Show @key(fields: "id") { id: ID title: String releaseYear: Int locatedIn: Locaion } type Location @key(fields: "id") @extends { id: ID @external }location.graphqls
type Location @key(fields: "id") { id: ID name: String }Beta Was this translation helpful? Give feedback.
All reactions