Skip to content

Commit

Permalink
enhance(utils/runtime): move getInContextSDK to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Nov 25, 2024
1 parent 9e34619 commit bfd8929
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/metal-buses-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-mesh/runtime': patch
'@graphql-mesh/utils': patch
---

Move \`getInContextSDK\` from runtime to utils
2 changes: 1 addition & 1 deletion packages/legacy/runtime/src/get-mesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import {
} from '@graphql-tools/utils';
import { wrapSchema } from '@graphql-tools/wrap';
import { fetch as defaultFetchFn } from '@whatwg-node/fetch';
import { getInContextSDK } from '../../utils/src/in-context-sdk.js';
import { MESH_CONTEXT_SYMBOL } from './constants.js';
import { getInContextSDK } from './in-context-sdk.js';
import type { ExecuteMeshFn, GetMeshOptions, MeshExecutor, SubscribeMeshFn } from './types.js';
import { getOriginalError } from './utils.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/runtime/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './get-mesh.js';
export type * from './types.js';
export * from './in-context-sdk.js';
export { getInContextSDK } from '@graphql-mesh/utils';
2 changes: 2 additions & 0 deletions packages/legacy/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
},
"dependencies": {
"@graphql-mesh/string-interpolation": "^0.5.6",
"@graphql-tools/batch-delegate": "^9.0.16",
"@graphql-tools/delegate": "^10.0.28",
"@graphql-tools/wrap": "^10.0.18",
"@whatwg-node/disposablestack": "^0.0.5",
"@whatwg-node/fetch": "^0.10.0",
"dset": "^3.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type {
SelectionSetParam,
SelectionSetParamOrFactory,
} from '@graphql-mesh/types';
import { iterateAsync, parseWithCache } from '@graphql-mesh/utils';
import type { BatchDelegateOptions } from '@graphql-tools/batch-delegate';
import { batchDelegateToSchema } from '@graphql-tools/batch-delegate';
import type {
Expand All @@ -34,7 +33,9 @@ import {
memoize1,
} from '@graphql-tools/utils';
import { WrapQuery } from '@graphql-tools/wrap';
import { MESH_API_CONTEXT_SYMBOL } from './constants.js';
import { MESH_API_CONTEXT_SYMBOL } from '../../runtime/src/constants.js';
import { iterateAsync } from './iterateAsync.js';
import { parseWithCache } from './parseAndPrintWithCache.js';

export function getInContextSDK(
unifiedSchema: GraphQLSchema,
Expand Down
1 change: 1 addition & 0 deletions packages/legacy/utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ export * from './registerTerminateHandler.js';
export * from './getAdditionalResolversFromTypeDefs.js';
export * from './get-def-directives.js';
export * from './disposable.js';
export * from './in-context-sdk.js';
2 changes: 2 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7323,7 +7323,9 @@ __metadata:
dependencies:
"@apollo/server": "npm:4.11.2"
"@graphql-mesh/string-interpolation": "npm:^0.5.6"
"@graphql-tools/batch-delegate": "npm:^9.0.16"
"@graphql-tools/delegate": "npm:^10.0.28"
"@graphql-tools/wrap": "npm:^10.0.18"
"@types/js-yaml": "npm:4.0.9"
"@types/lodash.topath": "npm:4.5.9"
"@types/object-hash": "npm:3.0.6"
Expand Down

0 comments on commit bfd8929

Please sign in to comment.