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
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.
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?
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
-
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