diff --git a/.changeset/wet-nails-develop.md b/.changeset/wet-nails-develop.md new file mode 100644 index 0000000000..e9ead68bc7 --- /dev/null +++ b/.changeset/wet-nails-develop.md @@ -0,0 +1,5 @@ +--- +'@urql/core': patch +--- + +Fix variable types in core makeOperation diff --git a/packages/core/src/utils/operation.ts b/packages/core/src/utils/operation.ts index 78eb157c84..b8a69bbf37 100644 --- a/packages/core/src/utils/operation.ts +++ b/packages/core/src/utils/operation.ts @@ -1,17 +1,24 @@ import { + AnyVariables, GraphQLRequest, Operation, OperationContext, OperationType, } from '../types'; -function makeOperation( +function makeOperation< + Data = any, + Variables extends AnyVariables = AnyVariables +>( kind: OperationType, request: GraphQLRequest, context: OperationContext ): Operation; -function makeOperation( +function makeOperation< + Data = any, + Variables extends AnyVariables = AnyVariables +>( kind: OperationType, request: Operation, context?: OperationContext