🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More

@apollo/server

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/server - npm Package Compare versions

Comparing version

to
4.8.0

import type { Logger } from '@apollo/utils.logger';
import { type Resolvable } from '@josephg/resolvable';
import { type DocumentNode, type GraphQLFieldResolver, type GraphQLFormattedError, type GraphQLSchema, type ParseOptions, type TypedQueryDocumentNode, type ValidationRule } from 'graphql';
import { type DocumentNode, type GraphQLFieldResolver, type GraphQLFormattedError, type GraphQLSchema, type ParseOptions, type TypedQueryDocumentNode, type ValidationRule, type FormattedExecutionResult } from 'graphql';
import { type KeyValueCache } from '@apollo/utils.keyvaluecache';

@@ -64,2 +64,3 @@ import type { ApolloServerPlugin, BaseContext, GraphQLRequest, GraphQLResponse, HTTPGraphQLRequest, HTTPGraphQLResponse, LandingPage, ApolloConfig, ApolloServerOptions, DocumentStore, PersistedQueryOptions, ContextThunk, HTTPGraphQLHead } from './externalTypes/index.js';

__testing_incrementalExecutionResults?: GraphQLExperimentalIncrementalExecutionResults;
stringifyResult: (value: FormattedExecutionResult) => string;
}

@@ -66,0 +67,0 @@ export declare class ApolloServer<in out TContext extends BaseContext = BaseContext> {

@@ -139,2 +139,3 @@ "use strict";

__testing_incrementalExecutionResults: config.__testing_incrementalExecutionResults,
stringifyResult: config.stringifyResult ?? runHttpQuery_js_1.prettyJSONStringify,
};

@@ -141,0 +142,0 @@ }

import type { Logger } from '@apollo/utils.logger';
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
import type { DocumentNode, GraphQLFieldResolver, GraphQLFormattedError, GraphQLSchema, ParseOptions, ValidationRule } from 'graphql';
import type { DocumentNode, FormattedExecutionResult, GraphQLFieldResolver, GraphQLFormattedError, GraphQLSchema, ParseOptions, ValidationRule } from 'graphql';
import type { KeyValueCache } from '@apollo/utils.keyvaluecache';

@@ -37,2 +37,3 @@ import type { GatewayInterface } from '@apollo/server-gateway-interface';

allowBatchedHttpRequests?: boolean;
stringifyResult?: (value: FormattedExecutionResult) => string;
introspection?: boolean;

@@ -39,0 +40,0 @@ plugins?: ApolloServerPlugin<TContext>[];

@@ -1,2 +0,2 @@

export declare const packageVersion = "4.7.5";
export declare const packageVersion = "4.8.0";
//# sourceMappingURL=packageVersion.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageVersion = void 0;
exports.packageVersion = "4.7.5";
exports.packageVersion = "4.8.0";
//# sourceMappingURL=packageVersion.js.map

@@ -155,3 +155,3 @@ "use strict";

kind: 'complete',
string: prettyJSONStringify(orderExecutionResultFields(graphQLResponse.body.singleResult)),
string: internals.stringifyResult(orderExecutionResultFields(graphQLResponse.body.singleResult)),
},

@@ -158,0 +158,0 @@ };

import type { Logger } from '@apollo/utils.logger';
import { type Resolvable } from '@josephg/resolvable';
import { type DocumentNode, type GraphQLFieldResolver, type GraphQLFormattedError, type GraphQLSchema, type ParseOptions, type TypedQueryDocumentNode, type ValidationRule } from 'graphql';
import { type DocumentNode, type GraphQLFieldResolver, type GraphQLFormattedError, type GraphQLSchema, type ParseOptions, type TypedQueryDocumentNode, type ValidationRule, type FormattedExecutionResult } from 'graphql';
import { type KeyValueCache } from '@apollo/utils.keyvaluecache';

@@ -64,2 +64,3 @@ import type { ApolloServerPlugin, BaseContext, GraphQLRequest, GraphQLResponse, HTTPGraphQLRequest, HTTPGraphQLResponse, LandingPage, ApolloConfig, ApolloServerOptions, DocumentStore, PersistedQueryOptions, ContextThunk, HTTPGraphQLHead } from './externalTypes/index.js';

__testing_incrementalExecutionResults?: GraphQLExperimentalIncrementalExecutionResults;
stringifyResult: (value: FormattedExecutionResult) => string;
}

@@ -66,0 +67,0 @@ export declare class ApolloServer<in out TContext extends BaseContext = BaseContext> {

@@ -110,2 +110,3 @@ import { isNodeLike } from '@apollo/utils.isnodelike';

__testing_incrementalExecutionResults: config.__testing_incrementalExecutionResults,
stringifyResult: config.stringifyResult ?? prettyJSONStringify,
};

@@ -112,0 +113,0 @@ }

import type { Logger } from '@apollo/utils.logger';
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
import type { DocumentNode, GraphQLFieldResolver, GraphQLFormattedError, GraphQLSchema, ParseOptions, ValidationRule } from 'graphql';
import type { DocumentNode, FormattedExecutionResult, GraphQLFieldResolver, GraphQLFormattedError, GraphQLSchema, ParseOptions, ValidationRule } from 'graphql';
import type { KeyValueCache } from '@apollo/utils.keyvaluecache';

@@ -37,2 +37,3 @@ import type { GatewayInterface } from '@apollo/server-gateway-interface';

allowBatchedHttpRequests?: boolean;
stringifyResult?: (value: FormattedExecutionResult) => string;
introspection?: boolean;

@@ -39,0 +40,0 @@ plugins?: ApolloServerPlugin<TContext>[];

@@ -1,2 +0,2 @@

export declare const packageVersion = "4.7.5";
export declare const packageVersion = "4.8.0";
//# sourceMappingURL=packageVersion.d.ts.map

@@ -1,2 +0,2 @@

export const packageVersion = "4.7.5";
export const packageVersion = "4.8.0";
//# sourceMappingURL=packageVersion.js.map

@@ -149,3 +149,3 @@ import { chooseContentTypeForSingleResultResponse, internalExecuteOperation, MEDIA_TYPES, } from './ApolloServer.js';

kind: 'complete',
string: prettyJSONStringify(orderExecutionResultFields(graphQLResponse.body.singleResult)),
string: internals.stringifyResult(orderExecutionResultFields(graphQLResponse.body.singleResult)),
},

@@ -152,0 +152,0 @@ };

{
"name": "@apollo/server",
"version": "4.7.5",
"version": "4.8.0",
"description": "Core engine for Apollo GraphQL server",

@@ -5,0 +5,0 @@ "type": "module",

@@ -18,2 +18,3 @@ import { isNodeLike } from '@apollo/utils.isnodelike';

type ValidationRule,
type FormattedExecutionResult,
} from 'graphql';

@@ -183,2 +184,3 @@ import {

__testing_incrementalExecutionResults?: GraphQLExperimentalIncrementalExecutionResults;
stringifyResult: (value: FormattedExecutionResult) => string;
}

@@ -337,2 +339,3 @@

config.__testing_incrementalExecutionResults,
stringifyResult: config.stringifyResult ?? prettyJSONStringify,
};

@@ -505,4 +508,4 @@ }

await Promise.all(
this.internals.plugins.map(async (plugin) =>
plugin.startupDidFail?.({ error }),
this.internals.plugins.map(
async (plugin) => plugin.startupDidFail?.({ error }),
),

@@ -1061,6 +1064,7 @@ );

await Promise.all(
this.internals.plugins.map(async (plugin) =>
plugin.contextCreationDidFail?.({
error,
}),
this.internals.plugins.map(
async (plugin) =>
plugin.contextCreationDidFail?.({
error,
}),
),

@@ -1098,4 +1102,5 @@ );

await Promise.all(
this.internals.plugins.map(async (plugin) =>
plugin.invalidRequestWasReceived?.({ error: maybeError }),
this.internals.plugins.map(
async (plugin) =>
plugin.invalidRequestWasReceived?.({ error: maybeError }),
),

@@ -1322,7 +1327,8 @@ );

await Promise.all(
internals.plugins.map(async (plugin) =>
plugin.unexpectedErrorProcessingRequest?.({
requestContext,
error,
}),
internals.plugins.map(
async (plugin) =>
plugin.unexpectedErrorProcessingRequest?.({
requestContext,
error,
}),
),

@@ -1329,0 +1335,0 @@ );

@@ -11,2 +11,3 @@ /**

DocumentNode,
FormattedExecutionResult,
GraphQLFieldResolver,

@@ -92,3 +93,3 @@ GraphQLFormattedError,

allowBatchedHttpRequests?: boolean;
stringifyResult?: (value: FormattedExecutionResult) => string;
introspection?: boolean;

@@ -95,0 +96,0 @@ plugins?: ApolloServerPlugin<TContext>[];

@@ -1,1 +0,1 @@

export const packageVersion = "4.7.5";
export const packageVersion = "4.8.0";

@@ -191,6 +191,7 @@ import { createHash } from '@apollo/utils.createhash';

await Promise.all(
requestListeners.map((l) =>
l.didResolveSource?.(
requestContext as GraphQLRequestContextDidResolveSource<TContext>,
),
requestListeners.map(
(l) =>
l.didResolveSource?.(
requestContext as GraphQLRequestContextDidResolveSource<TContext>,
),
),

@@ -324,6 +325,7 @@ );

await Promise.all(
requestListeners.map((l) =>
l.didResolveOperation?.(
requestContext as GraphQLRequestContextDidResolveOperation<TContext>,
),
requestListeners.map(
(l) =>
l.didResolveOperation?.(
requestContext as GraphQLRequestContextDidResolveOperation<TContext>,
),
),

@@ -377,6 +379,7 @@ );

await Promise.all(
requestListeners.map((l) =>
l.executionDidStart?.(
requestContext as GraphQLRequestContextExecutionDidStart<TContext>,
),
requestListeners.map(
(l) =>
l.executionDidStart?.(
requestContext as GraphQLRequestContextExecutionDidStart<TContext>,
),
),

@@ -393,4 +396,5 @@ )

(...args) =>
invokeSyncDidStartHook(executionListeners, (l) =>
l.willResolveField?.(...args),
invokeSyncDidStartHook(
executionListeners,
(l) => l.willResolveField?.(...args),
);

@@ -584,7 +588,8 @@

await Promise.all(
requestListeners.map((l) =>
l.didEncounterSubsequentErrors?.(
requestContext as GraphQLRequestContextDidEncounterSubsequentErrors<TContext>,
errors,
),
requestListeners.map(
(l) =>
l.didEncounterSubsequentErrors?.(
requestContext as GraphQLRequestContextDidEncounterSubsequentErrors<TContext>,
errors,
),
),

@@ -609,7 +614,8 @@ );

await Promise.all(
requestListeners.map((l) =>
l.willSendSubsequentPayload?.(
requestContext as GraphQLRequestContextWillSendSubsequentPayload<TContext>,
payload,
),
requestListeners.map(
(l) =>
l.willSendSubsequentPayload?.(
requestContext as GraphQLRequestContextWillSendSubsequentPayload<TContext>,
payload,
),
),

@@ -624,6 +630,7 @@ );

await Promise.all(
requestListeners.map((l) =>
l.willSendResponse?.(
requestContext as GraphQLRequestContextWillSendResponse<TContext>,
),
requestListeners.map(
(l) =>
l.willSendResponse?.(
requestContext as GraphQLRequestContextWillSendResponse<TContext>,
),
),

@@ -639,6 +646,7 @@ );

return await Promise.all(
requestListeners.map((l) =>
l.didEncounterErrors?.(
requestContext as GraphQLRequestContextDidEncounterErrors<TContext>,
),
requestListeners.map(
(l) =>
l.didEncounterErrors?.(
requestContext as GraphQLRequestContextDidEncounterErrors<TContext>,
),
),

@@ -645,0 +653,0 @@ );

@@ -263,3 +263,3 @@ import type {

kind: 'complete',
string: prettyJSONStringify(
string: internals.stringifyResult(
orderExecutionResultFields(graphQLResponse.body.singleResult),

@@ -266,0 +266,0 @@ ),

@@ -58,3 +58,3 @@ import type { WithRequired } from '@apollo/utils.withrequired';

const context = options?.context ?? (async () => ({} as TContext));
const context = options?.context ?? (async () => ({}) as TContext);
app.use(

@@ -61,0 +61,0 @@ cors(),

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet