Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
352 views
in Technique[技术] by (71.8m points)

Resolver with multiple datasources GraphQL

I'm trying to use two different data sources in a single resolver to merge the data and return it to the front. But when I'm calling the data sources the objects aren't retrieved properly like below:

orders: {
 bag: {
    total: [Object],
    partial: [Object],
    discount: [Object]
}

I think the reason behind that is because I am not mapped the types for those objects in the schema. But how can I set a schema direcly to the datasource without create a new resolver?

question from:https://stackoverflow.com/questions/65938237/resolver-with-multiple-datasources-graphql

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...