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
In Application Dial, added a custom resolver for InstrumentSet:
public class InstrumentSetResolver implements GraphQLResolver<InstrumentSet> {
public Dial dial(InstrumentSet instrument) {
// some repository look ups, nothing fancy, eg
return dialRepository.findByInstrumentSetId(instrument.getId());
}
}
...
public class SubGraphSchema
...
public GraphQLSchema customSchema() {
return SchemaParser.newParser()
.file("dial.graphqls")
.resolvers (
queryresolver, // a query resolver implements queries, those work and are fine
mutationresolver)
.build()
.makeExecutableSchema();
}
I can see when I submit the query that both applications begin loading the data immediately, but then when the results are merged into the final output, the data results in dials showing up in the wrong instrument list.
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
-
Hi, I'm getting data that does not match the correct object.
This is the query
`
But the data I get back is incorrect:
but dials are in the wrong instrument list. list2 should have dial 123, and list2 should have diab 123
I have the following 2 subgraphs: instruments and dials:
instruments.graphqls:
In Application Instruments, no special resolvers needed:
dial.graphqls:
In Application Dial, added a custom resolver for InstrumentSet:
I can see when I submit the query that both applications begin loading the data immediately, but then when the results are merged into the final output, the data results in dials showing up in the wrong instrument list.
How do I resolve this?
Beta Was this translation helpful? Give feedback.
All reactions