Using mesh v1 how can I extend the schema on a field that has map with ids ? #8380
Unanswered
dimitrisfasoulas
asked this question in
Q&A
Replies: 1 comment
-
comments under Post is an array of comments so in order to fill the missing fields, you should use Type Merging instead. |
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
-
I have a rest api that when requesting GET on /getPosts I get the following schema:
There is another rest api that I can use to get the comments based on comment id
/comments/{id}
The problem I have is that "comments" is a map of titles and uuids so the ids of the comments are returned as values in the
"comments"
part of the/getPosts
.If I use
additionalTypeDefs
:sourceArgs gets resolved to [object object] and as far as I understand I can't use JS to manipulate sourceArgs (like
sourceArgs: { id: "{Object.values(root.comments)}" }
)Using mesh v1 what options do I have to resolve this ?
Beta Was this translation helpful? Give feedback.
All reactions