Stitch input
#6886
Replies: 1 comment
-
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.
-
Hello, its pretty easy to stitch output, but how to stitch input?
Use case is following: there is 1 microservice which provides data in form of questions to be shown, and other service which stores answers.
So there is Microservice questions, Microservice answers and FE.
FE will fetch and show questions from QUESTION microservice, then send mutation to store these questions - the issue is that gateway will receive the IDs of questions and it must stitch other info of question like title and send it to answers microservice.
Very simply overview:
Microservice questions:
Microservice Answer
So gateway will must hide
QuestionInput.title
and internally fetch question where id = X and populate its title and pass it to answers microservice.I've tried with
but its type is not correct - it says it return
Question | undefined
, but on error it returns error.Furthermore: I must add middleware to all mutations using this input, which is cucumbersome, because there are 2 currently. Is there way to add middleware to modify the input itself?
Beta Was this translation helpful? Give feedback.
All reactions