Skip to content

Commit

Permalink
Bump dependencies and export helpers (#3549)
Browse files Browse the repository at this point in the history
* Bump dependencies

* Reorganize dependencies

* More

* chore(dependencies): updated changesets for modified dependencies

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ardatan and github-actions[bot] authored Dec 13, 2024
1 parent eca7cd1 commit 05fe345
Show file tree
Hide file tree
Showing 20 changed files with 98 additions and 105 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-yoga/plugin-apollo-usage-report": patch
---
dependencies updates:
- Removed dependency [`@graphql-tools/utils@^10.6.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.1) (from `peerDependencies`)
- Removed dependency [`@whatwg-node/fetch@^0.10.1` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.1) (from `peerDependencies`)
5 changes: 5 additions & 0 deletions .changeset/@graphql-yoga_plugin-apq-3549-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-yoga/plugin-apq": patch
---
dependencies updates:
- Removed dependency [`@graphql-tools/utils@^10.6.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.1) (from `peerDependencies`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-yoga/plugin-persisted-operations": patch
---
dependencies updates:
- Removed dependency [`@graphql-tools/utils@^10.6.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.1) (from `peerDependencies`)
8 changes: 8 additions & 0 deletions .changeset/graphql-yoga-3549-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"graphql-yoga": patch
---
dependencies updates:
- Updated dependency [`@graphql-tools/executor@^1.3.7` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor/v/1.3.7) (from `^1.3.5`, in `dependencies`)
- Updated dependency [`@graphql-tools/schema@^10.0.11` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.11) (from `^10.0.10`, in `dependencies`)
- Updated dependency [`@graphql-tools/utils@^10.6.2` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.6.2) (from `^10.6.1`, in `dependencies`)
- Updated dependency [`@whatwg-node/server@^0.9.63` ↗︎](https://www.npmjs.com/package/@whatwg-node/server/v/0.9.63) (from `^0.9.60`, in `dependencies`)
8 changes: 4 additions & 4 deletions packages/graphql-yoga/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
},
"dependencies": {
"@envelop/core": "^5.0.2",
"@graphql-tools/executor": "^1.3.5",
"@graphql-tools/schema": "^10.0.10",
"@graphql-tools/utils": "^10.6.1",
"@graphql-tools/executor": "^1.3.7",
"@graphql-tools/schema": "^10.0.11",
"@graphql-tools/utils": "^10.6.2",
"@graphql-yoga/logger": "workspace:^",
"@graphql-yoga/subscription": "workspace:^",
"@whatwg-node/fetch": "^0.10.1",
"@whatwg-node/server": "^0.9.60",
"@whatwg-node/server": "^0.9.63",
"dset": "^3.1.1",
"lru-cache": "^10.0.0",
"tslib": "^2.8.1"
Expand Down
2 changes: 0 additions & 2 deletions packages/graphql-yoga/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import type { YogaLogger } from '@graphql-yoga/logger';
import type { ResultProcessorInput } from './plugins/types.js';
import type { GraphQLHTTPExtensions, YogaMaskedErrorOpts } from './types.js';

export { createGraphQLError };

declare module 'graphql' {
interface GraphQLErrorExtensions {
http?: GraphQLHTTPExtensions;
Expand Down
4 changes: 3 additions & 1 deletion packages/graphql-yoga/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { createGraphQLError } from './error.js';
export * from '@graphql-yoga/logger';
export { type Plugin } from './plugins/types.js';
export { type GraphiQLOptions } from './plugins/use-graphiql.js';
Expand Down Expand Up @@ -37,9 +36,12 @@ export {
useLogger,
usePayloadFormatter,
} from '@envelop/core';
export { createGraphQLError, isPromise, mapMaybePromise } from '@graphql-tools/utils';
export { getSSEProcessor } from './plugins/result-processor/sse.js';
export { processRegularResult } from './plugins/result-processor/regular.js';
export { useExecutionCancellation } from './plugins/use-execution-cancellation.js';
export {
type LandingPageRenderer,
type LandingPageRendererOpts,
} from './plugins/use-unhandled-route.js';
export { DisposableSymbols } from '@whatwg-node/server';
2 changes: 1 addition & 1 deletion packages/graphql-yoga/src/plugins/plugins.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AfterValidateHook } from '@envelop/core';
import { createGraphQLError } from '../error.js';
import { createGraphQLError } from '@graphql-tools/utils';
import { createSchema } from '../schema.js';
import { createYoga } from '../server.js';
import { Plugin } from './types.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createGraphQLError } from '../../error.js';
import { createGraphQLError } from '@graphql-tools/utils';
import type { Plugin } from '../types.js';

export function useLimitBatching(limit?: number): Plugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GraphQLError } from 'graphql';
import { createGraphQLError, isGraphQLError } from '../../error.js';
import { createGraphQLError } from '@graphql-tools/utils';
import { isGraphQLError } from '../../error.js';
import { MaybeArray } from '../../types.js';
import { ExecutionResultWithSerializer } from '../types.js';

Expand Down
3 changes: 1 addition & 2 deletions packages/graphql-yoga/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,8 @@ export class YogaServer<
/** Ensure that error thrown from subscribe is sent to client */
// TODO: this should probably be something people can customize via a hook?
if (isAsyncIterable(result)) {
const iterator = result[Symbol.asyncIterator]();
result = mapAsyncIterator(
iterator,
result,
v => v,
(err: Error) => {
if (err.name === 'AbortError') {
Expand Down
3 changes: 1 addition & 2 deletions packages/plugins/apollo-managed-federation/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createGraphQLError, type Plugin } from 'graphql-yoga';
import { createGraphQLError, DisposableSymbols, type Plugin } from 'graphql-yoga';
import {
FetchError,
SupergraphSchemaManager,
Expand All @@ -7,7 +7,6 @@ import {
type SupergraphSchemaManagerOptions,
type SupergraphSchemaManagerSchemaEvent,
} from '@graphql-tools/federation';
import { DisposableSymbols } from '@whatwg-node/disposablestack';

export type ManagedFederationPluginOptions = (
| SupergraphSchemaManager
Expand Down
2 changes: 0 additions & 2 deletions packages/plugins/apollo-usage-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
"check": "tsc --pretty --noEmit"
},
"peerDependencies": {
"@graphql-tools/utils": "^10.6.1",
"@whatwg-node/fetch": "^0.10.1",
"graphql": "^15.2.0 || ^16.0.0",
"graphql-yoga": "workspace:^"
},
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/apq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"check": "tsc --pretty --noEmit"
},
"peerDependencies": {
"@graphql-tools/utils": "^10.6.1",
"graphql-yoga": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ASTVisitor, Kind, ValidationContext } from 'graphql';
import {
createGraphQLError,
GraphQLDeferDirective,
GraphQLStreamDirective,
} from '@graphql-tools/utils';
import { createGraphQLError } from 'graphql-yoga';
import { GraphQLDeferDirective, GraphQLStreamDirective } from '@graphql-tools/utils';

/**
* Stream directive on list field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ASTVisitor, ValidationContext } from 'graphql';
import {
createGraphQLError,
GraphQLDeferDirective,
GraphQLStreamDirective,
} from '@graphql-tools/utils';
import { createGraphQLError } from 'graphql-yoga';
import { GraphQLDeferDirective, GraphQLStreamDirective } from '@graphql-tools/utils';

/**
* Stream directive on list field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
ValidationContext,
ValueNode,
} from 'graphql';
import { createGraphQLError, inspect, Maybe } from '@graphql-tools/utils';
import { createGraphQLError } from 'graphql-yoga';
import { inspect, Maybe } from '@graphql-tools/utils';

/**
* Returns a number indicating whether a reference string comes before, or after,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ASTVisitor, DirectiveNode, isListType, isWrappingType, ValidationContext } from 'graphql';
import { createGraphQLError, GraphQLStreamDirective } from '@graphql-tools/utils';
import { createGraphQLError } from 'graphql-yoga';
import { GraphQLStreamDirective } from '@graphql-tools/utils';

/**
* Stream directive on list field
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/persisted-operations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"check": "tsc --pretty --noEmit"
},
"peerDependencies": {
"@graphql-tools/utils": "^10.6.1",
"graphql": "^15.2.0 || ^16.0.0",
"graphql-yoga": "workspace:^"
},
Expand Down
Loading

0 comments on commit 05fe345

Please sign in to comment.