Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apollo/server

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/server - npm Package Compare versions

Comparing version 4.6.0 to 4.7.0

2

dist/cjs/generated/packageVersion.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageVersion = void 0;
exports.packageVersion = "4.6.0";
exports.packageVersion = "4.7.0";
//# sourceMappingURL=packageVersion.js.map

@@ -12,5 +12,6 @@ "use strict";

const getEmbeddedExplorerHTML = (explorerCdnVersion, config, apolloServerVersion) => {
const productionLandingPageConfigOrDefault = {
const productionLandingPageEmbedConfigOrDefault = {
displayOptions: {},
persistExplorerState: false,
runTelemetry: true,
...(typeof config.embed === 'boolean' ? {} : config.embed),

@@ -36,8 +37,9 @@ };

displayOptions: {
...productionLandingPageConfigOrDefault.displayOptions,
...productionLandingPageEmbedConfigOrDefault.displayOptions,
},
},
persistExplorerState: productionLandingPageConfigOrDefault.persistExplorerState,
persistExplorerState: productionLandingPageEmbedConfigOrDefault.persistExplorerState,
includeCookies: config.includeCookies,
runtime: apolloServerVersion,
runTelemetry: productionLandingPageEmbedConfigOrDefault.runTelemetry,
};

@@ -71,7 +73,32 @@ return `

const getEmbeddedSandboxHTML = (sandboxCdnVersion, config, apolloServerVersion) => {
const endpointIsEditable = typeof config.embed === 'boolean'
? false
: typeof config.embed?.endpointIsEditable === 'boolean'
? config.embed?.endpointIsEditable
: false;
const localDevelopmentEmbedConfigOrDefault = {
runTelemetry: true,
endpointIsEditable: false,
initialState: {},
...(typeof config.embed === 'boolean' ? {} : config.embed ?? {}),
};
const embeddedSandboxConfig = {
target: '#embeddableSandbox',
initialState: {
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...localDevelopmentEmbedConfigOrDefault.initialState,
},
hideCookieToggle: false,
endpointIsEditable: localDevelopmentEmbedConfigOrDefault.endpointIsEditable,
runtime: apolloServerVersion,
runTelemetry: localDevelopmentEmbedConfigOrDefault.runTelemetry,
};
return `

@@ -94,37 +121,9 @@ <div class="fallback">

var initialEndpoint = window.location.href;
new window.EmbeddedSandbox({
target: '#embeddableSandbox',
initialEndpoint,
initialState: ${getConfigStringForHtml({
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.pollForSchemaUpdates !== undefined
? {
pollForSchemaUpdates: config.embed?.initialState?.pollForSchemaUpdates,
}
: {}),
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.sharedHeaders !== undefined
? {
sharedHeaders: config.embed?.initialState?.sharedHeaders,
}
: {}),
})},
hideCookieToggle: false,
endpointIsEditable: ${endpointIsEditable},
runtime: '${apolloServerVersion}'
});
var embeddedSandboxConfig = ${getConfigStringForHtml(embeddedSandboxConfig)};
new window.EmbeddedSandbox(
{
...embeddedSandboxConfig,
initialEndpoint,
}
);
</script>

@@ -131,0 +130,0 @@ `;

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

export declare const packageVersion = "4.6.0";
export declare const packageVersion = "4.7.0";
//# sourceMappingURL=packageVersion.d.ts.map

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

export const packageVersion = "4.6.0";
export const packageVersion = "4.7.0";
//# sourceMappingURL=packageVersion.js.map

@@ -9,5 +9,6 @@ function getConfigStringForHtml(config) {

export const getEmbeddedExplorerHTML = (explorerCdnVersion, config, apolloServerVersion) => {
const productionLandingPageConfigOrDefault = {
const productionLandingPageEmbedConfigOrDefault = {
displayOptions: {},
persistExplorerState: false,
runTelemetry: true,
...(typeof config.embed === 'boolean' ? {} : config.embed),

@@ -33,8 +34,9 @@ };

displayOptions: {
...productionLandingPageConfigOrDefault.displayOptions,
...productionLandingPageEmbedConfigOrDefault.displayOptions,
},
},
persistExplorerState: productionLandingPageConfigOrDefault.persistExplorerState,
persistExplorerState: productionLandingPageEmbedConfigOrDefault.persistExplorerState,
includeCookies: config.includeCookies,
runtime: apolloServerVersion,
runTelemetry: productionLandingPageEmbedConfigOrDefault.runTelemetry,
};

@@ -67,7 +69,32 @@ return `

export const getEmbeddedSandboxHTML = (sandboxCdnVersion, config, apolloServerVersion) => {
const endpointIsEditable = typeof config.embed === 'boolean'
? false
: typeof config.embed?.endpointIsEditable === 'boolean'
? config.embed?.endpointIsEditable
: false;
const localDevelopmentEmbedConfigOrDefault = {
runTelemetry: true,
endpointIsEditable: false,
initialState: {},
...(typeof config.embed === 'boolean' ? {} : config.embed ?? {}),
};
const embeddedSandboxConfig = {
target: '#embeddableSandbox',
initialState: {
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...localDevelopmentEmbedConfigOrDefault.initialState,
},
hideCookieToggle: false,
endpointIsEditable: localDevelopmentEmbedConfigOrDefault.endpointIsEditable,
runtime: apolloServerVersion,
runTelemetry: localDevelopmentEmbedConfigOrDefault.runTelemetry,
};
return `

@@ -90,37 +117,9 @@ <div class="fallback">

var initialEndpoint = window.location.href;
new window.EmbeddedSandbox({
target: '#embeddableSandbox',
initialEndpoint,
initialState: ${getConfigStringForHtml({
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.pollForSchemaUpdates !== undefined
? {
pollForSchemaUpdates: config.embed?.initialState?.pollForSchemaUpdates,
}
: {}),
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.sharedHeaders !== undefined
? {
sharedHeaders: config.embed?.initialState?.sharedHeaders,
}
: {}),
})},
hideCookieToggle: false,
endpointIsEditable: ${endpointIsEditable},
runtime: '${apolloServerVersion}'
});
var embeddedSandboxConfig = ${getConfigStringForHtml(embeddedSandboxConfig)};
new window.EmbeddedSandbox(
{
...embeddedSandboxConfig,
initialEndpoint,
}
);
</script>

@@ -127,0 +126,0 @@ `;

@@ -36,2 +36,3 @@ type InitialDocumentVariablesHeaders = {

type EmbeddableSandboxOptions = {
runTelemetry?: boolean;
initialState?: {

@@ -44,2 +45,3 @@ pollForSchemaUpdates?: boolean;

type EmbeddableExplorerOptions = {
runTelemetry?: boolean;
displayOptions?: {

@@ -50,3 +52,3 @@ showHeadersAndEnvVars: boolean;

};
persistExplorerState: boolean;
persistExplorerState?: boolean;
};

@@ -53,0 +55,0 @@ export type ApolloServerPluginLandingPageLocalDefaultOptions = ApolloServerPluginEmbeddedLandingPageLocalDefaultOptions | ApolloServerPluginNonEmbeddedLandingPageLocalDefaultOptions;

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

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

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

export const packageVersion = "4.6.0";
export const packageVersion = "4.7.0";

@@ -49,6 +49,9 @@ import type {

includeCookies?: boolean; // defaults to 'false'
runTelemetry?: boolean;
}
const productionLandingPageConfigOrDefault = {
const productionLandingPageEmbedConfigOrDefault = {
displayOptions: {},
persistExplorerState: false,
runTelemetry: true,
...(typeof config.embed === 'boolean' ? {} : config.embed),

@@ -77,9 +80,10 @@ };

displayOptions: {
...productionLandingPageConfigOrDefault.displayOptions,
...productionLandingPageEmbedConfigOrDefault.displayOptions,
},
},
persistExplorerState:
productionLandingPageConfigOrDefault.persistExplorerState,
productionLandingPageEmbedConfigOrDefault.persistExplorerState,
includeCookies: config.includeCookies,
runtime: apolloServerVersion,
runTelemetry: productionLandingPageEmbedConfigOrDefault.runTelemetry,
};

@@ -124,8 +128,32 @@

) => {
const endpointIsEditable =
typeof config.embed === 'boolean'
? false
: typeof config.embed?.endpointIsEditable === 'boolean'
? config.embed?.endpointIsEditable
: false;
const localDevelopmentEmbedConfigOrDefault = {
runTelemetry: true,
endpointIsEditable: false,
initialState: {},
...(typeof config.embed === 'boolean' ? {} : config.embed ?? {}),
};
const embeddedSandboxConfig = {
target: '#embeddableSandbox',
initialState: {
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...localDevelopmentEmbedConfigOrDefault.initialState,
},
hideCookieToggle: false,
endpointIsEditable: localDevelopmentEmbedConfigOrDefault.endpointIsEditable,
runtime: apolloServerVersion,
runTelemetry: localDevelopmentEmbedConfigOrDefault.runTelemetry,
};
return `

@@ -152,40 +180,11 @@ <div class="fallback">

var initialEndpoint = window.location.href;
new window.EmbeddedSandbox({
target: '#embeddableSandbox',
initialEndpoint,
initialState: ${getConfigStringForHtml({
...('document' in config || 'headers' in config || 'variables' in config
? {
document: config.document,
variables: config.variables,
headers: config.headers,
}
: {}),
...('collectionId' in config
? {
collectionId: config.collectionId,
operationId: config.operationId,
}
: {}),
includeCookies: config.includeCookies,
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.pollForSchemaUpdates !== undefined
? {
pollForSchemaUpdates:
config.embed?.initialState?.pollForSchemaUpdates,
}
: {}),
...(typeof config.embed !== 'boolean' &&
config.embed?.initialState?.sharedHeaders !== undefined
? {
sharedHeaders: config.embed?.initialState?.sharedHeaders,
}
: {}),
})},
hideCookieToggle: false,
endpointIsEditable: ${endpointIsEditable},
runtime: '${apolloServerVersion}'
});
var embeddedSandboxConfig = ${getConfigStringForHtml(embeddedSandboxConfig)};
new window.EmbeddedSandbox(
{
...embeddedSandboxConfig,
initialEndpoint,
}
);
</script>
`;
};

@@ -55,2 +55,3 @@ type InitialDocumentVariablesHeaders = {

includeCookies?: boolean;
// For Apollo use only.

@@ -110,2 +111,6 @@ __internal_apolloStudioEnv__?: 'staging' | 'prod';

type EmbeddableSandboxOptions = {
/**
* Set to false to disable running telemetry in Apollo Studio from the landing pages.
*/
runTelemetry?: boolean;
initialState?: {

@@ -142,2 +147,6 @@ /**

/**
* Set to false to disable running telemetry in Apollo Studio from the landing pages.
*/
runTelemetry?: boolean;
/**
* Display options can be configured for the embedded Explorer.

@@ -178,3 +187,3 @@ */

*/
persistExplorerState: boolean;
persistExplorerState?: boolean;
};

@@ -181,0 +190,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc