urql-custom-scalars-exchange icon indicating copy to clipboard operation
urql-custom-scalars-exchange copied to clipboard

Support `urql@^4.0.0`

Open ericbf opened this issue 1 year ago • 2 comments

There were some breaking changes in 4.0.0 that make the interface incompatible, at least type-wise.

Works: image

Doesn’t work: image

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)

ericbf avatar Apr 11 '23 18:04 ericbf

+1 I need this

AlbertMarashi avatar May 30 '23 06:05 AlbertMarashi