Remove removeTypenameFromVariableExchange
to be agnostic to GQL client
#183
Labels
removeTypenameFromVariableExchange
to be agnostic to GQL client
#183
Currently, fabrix internally depends on urql, but we have a plan to make it pluggable by #123
Background
Since fabrix automatically adds
__typename
in its selection that is needed to look up the field type to decide the component to render, in the case of executing update mutation directly with the entities fetched from another queries,__typename
should manually be removed before sending the mutation requests to the server without the custom exchange of urql (removeTypenameFromVariableExchange
) to avoid an error caused by unmatched fields.https://github.com/fabrix-framework/fabrix/blob/main/packages/fabrix/src/exchanges/removeTypenameFromVariable.ts
However, the behaviour does not have to be implemented as an urql exchange, so remove
removeTypenameFromVariableExchange
and implement the behaviour as just a simple object manipulation instead.The text was updated successfully, but these errors were encountered: