urql-custom-scalars-exchange
urql-custom-scalars-exchange copied to clipboard
Support `urql@^4.0.0`
There were some breaking changes in 4.0.0
that make the interface incompatible, at least type-wise.
Works:
Doesn’t work:
Error:
Type 'import("<path>/node_modules/@urql/core/dist/urql-core-chunk").Exchange' is not assignable to type 'import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").Exchange'.
Types of parameters 'input' and 'input' are incompatible.
Type 'import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").ExchangeInput' is not assignable to type 'import("<path>/node_modules/@urql/core/dist/urql-core-chunk").ExchangeInput'.
The types of 'client.operations$' are incompatible between these types.
Type 'import("<path>/node_modules/wonka/dist/wonka").Source<import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").Operation<any, import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").AnyVariabl...' is not assignable to type 'import("<path>/node_modules/wonka/dist/wonka").Source<import("<path>/node_modules/@urql/core/dist/urql-core-chunk").Operation<any, import("<path>/node_modules/@urql/core/dist/urql-core-chunk").AnyVariables>>'.
Type 'import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").Operation<any, import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").AnyVariables>' is not assignable to type 'import("<path>/node_modules/@urql/core/dist/urql-core-chunk").Operation<any, import("<path>/node_modules/@urql/core/dist/urql-core-chunk").AnyVariables>'.
The types of 'context._instance' are incompatible between these types.
Type 'import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").OperationInstance | undefined' is not assignable to type 'import("<path>/node_modules/@urql/core/dist/urql-core-chunk").OperationInstance | undefined'.
Type 'OperationInstance' is not assignable to type 'OperationInstance | undefined'.
Type 'import("<path>/node_modules/urql/node_modules/@urql/core/dist/urql-core-chunk").OperationInstance' is not assignable to type 'import("<path>/node_modules/@urql/core/dist/urql-core-chunk").OperationInstance'.
Type 'OperationInstance' is not assignable to type '{ readonly _opaque: unique symbol; }'.
Types of property '_opaque' are incompatible.
Type 'typeof _opaque' is not assignable to type 'typeof _opaque'. Two different types with this name exist, but they are unrelated.ts(2322)
+1 I need this