Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Remove removeTypenameFromVariableExchange to be agnostic to GQL client #183

@IzumiSy

Description

@IzumiSy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions