Replies: 2 comments 6 replies
-
I'm not exactly sure I follow what you're asking, but isn't this basically what GraphQL does? It lets you write individual resolvers for each data type and GraphQL execution takes care of attaching all the different types into a response. Or is this specifically about trying to reduce the number of calls to your APIs? |
Beta Was this translation helpful? Give feedback.
5 replies
-
I just mean that it wouldn't let me have a resolver and a typedef with a
dot in the name. So `Price.md` wasn't an allowed name.
/geir
…On Thu, Mar 11, 2021 at 9:20 PM David Glasser ***@***.***> wrote:
That there is the general pattern for fields that look up other objects in
databases.
I don't think I can provide guidance on your "doesn't like the ." issue
without a full reproduction.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5011 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABL5LEOENFVVQQJPHFE2ACDTDEJWDANCNFSM4Y2DWNSQ>
.
--
Geir Sjurseth | Tech Strategist EMEA (Apigee) | ***@***.*** | +46
734 48 67 14
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering what the right approach would be to chain datasources. I'm building a simple demo application that sits on top of a several microservices with RESTful APIs:
masterdata,
prices
warehouse
prices and warehouse use a uuid-reference to masterdata for all of their data. So far I've written typdefs for masterdata (working: query all and query by name or by id), and typedefs for prices (query all and query by id).
I want the resolvers to chain, but do that the resulting payload needs to have all of the elements (including the nested bits). So what i've done is to add the masterdata datasource to my prices datasource. I then instantiate it there and call initialize on it directly. That way I can add a method to getMasterdataById in my reducer for prices.
This appears to work.... But am I doing this right?
I feel like there's gotta be a better way to have this sorta auto-wire as opposed to me forcing it in my reducer. Am I missing something obvious?
Beta Was this translation helpful? Give feedback.
All reactions