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
When we want to write in the cache using writeQuery, writeFragment, fetchMore.updateQuery ... we need to send it in a JSON format.
It can work as is, if the query has no optional, no fragments in it. But if it does, then the parse function returns a type that includes one or more variants. Which is great, but it can't be reused as is as a JSON format.
Even if we try an unsafe cast it wouldn't work because Bucklescript will translate the variant as an array.
Dog(4) => [2534, 4].
What would solve this would be a generated serialize function that do the opposite of what parse is doing: