Skip to content

Custom exchange — mapping result with added property #1497

Answered by kitten
svey asked this question in Q&A
Discussion options

You must be logged in to vote

Where are you trying to access the custom addition from? The exchange does look correct but it's worth noting that you'll have to guide yourself by the TypeScript types. We don't guarantee arbitrary properties on operations or results to be passed through. Generally speaking, we don't want this to happen, so it's safer to extend the operation on your result by making a copy of it using makeOperation and adding your own metadata on using a property on operation.context

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kitten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants