diff --git a/.changeset/popular-bananas-camp.md b/.changeset/popular-bananas-camp.md new file mode 100644 index 0000000000..afc66d88ad --- /dev/null +++ b/.changeset/popular-bananas-camp.md @@ -0,0 +1,6 @@ +--- +"@urql/core": patch +"@urql/exchange-execute": patch +--- + +Export `getOperationName` from `@urql/core` and use it in `@urql/exchange-execute`, fixing several imports. diff --git a/exchanges/execute/src/execute.test.ts b/exchanges/execute/src/execute.test.ts index 77b6df6afb..04f85a1772 100644 --- a/exchanges/execute/src/execute.test.ts +++ b/exchanges/execute/src/execute.test.ts @@ -13,11 +13,14 @@ import { Source, } from 'wonka'; import { mocked } from 'ts-jest/utils'; -import { getOperationName } from '@urql/core/utils'; import { queryOperation } from '@urql/core/test-utils'; -import { makeErrorResult, makeOperation } from '@urql/core'; -import { Client } from '@urql/core/client'; -import { OperationResult } from '@urql/core/types'; +import { + makeErrorResult, + makeOperation, + Client, + getOperationName, + OperationResult, +} from '@urql/core'; const schema = 'STUB_SCHEMA' as any; const exchangeArgs = { diff --git a/exchanges/execute/src/execute.ts b/exchanges/execute/src/execute.ts index 0ee25fed5d..e628e550a0 100644 --- a/exchanges/execute/src/execute.ts +++ b/exchanges/execute/src/execute.ts @@ -16,8 +16,13 @@ import { execute, } from 'graphql'; -import { Exchange, makeResult, makeErrorResult, Operation } from '@urql/core'; -import { getOperationName } from '@urql/core/utils'; +import { + Exchange, + makeResult, + makeErrorResult, + Operation, + getOperationName, +} from '@urql/core'; interface ExecuteExchangeArgs { schema: GraphQLSchema; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 2c28ad757e..cd29959681 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -13,4 +13,5 @@ export { formatDocument, maskTypename, makeOperation, + getOperationName, } from './utils';