Help on using Mutation in Additional Resolver #4974
Unanswered
neerajkr666
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I think you saw a wrong example, it is actually |
Beta Was this translation helpful? Give feedback.
1 reply
-
Can anyone please help on this? How to use mutation for fetching |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Need help in making use of a mutation from an underlying open API schema
Scenario:
Have setup with multiple sources and from one of the underlying source (openapi) need to fetch data and set to a new field. Need to use additional resolvers code since the input object for this mutation requires building an complex input object.
This fetch needs to be from a mutation since the underlying schema has this as POST api.
I found documentation/example where I can use Query but could not find anything on Mutation.
I saw how
context.sourceName.Query.fieldName
can be used for queries and tried outcontext.sourceName.Mutation.fieldName
which did not work. I tried to directly call fetch method and it worked.Isn't it possible to call Mutation? Or is there any other way?
Thanks in Advance.
Part of .meshrc.yaml:
Additional Resolver Code, which did not work:
The fetch call which worked:
Beta Was this translation helpful? Give feedback.
All reactions