Initial Save
This commit is contained in:
33
node_modules/apollo-server-express/dist/ApolloServer.d.ts
generated
vendored
Normal file
33
node_modules/apollo-server-express/dist/ApolloServer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import express from 'express';
|
||||
import corsMiddleware from 'cors';
|
||||
import { OptionsJson } from 'body-parser';
|
||||
import { GraphQLOptions, ApolloServerBase, ContextFunction, Context, Config } from 'apollo-server-core';
|
||||
import type { ExecutionParams } from 'subscriptions-transport-ws';
|
||||
export { GraphQLOptions, GraphQLExtension } from 'apollo-server-core';
|
||||
export interface GetMiddlewareOptions {
|
||||
path?: string;
|
||||
cors?: corsMiddleware.CorsOptions | corsMiddleware.CorsOptionsDelegate | boolean;
|
||||
bodyParserConfig?: OptionsJson | boolean;
|
||||
onHealthCheck?: (req: express.Request) => Promise<any>;
|
||||
disableHealthCheck?: boolean;
|
||||
}
|
||||
export interface ServerRegistration extends GetMiddlewareOptions {
|
||||
app: express.Application;
|
||||
}
|
||||
export interface ExpressContext {
|
||||
req: express.Request;
|
||||
res: express.Response;
|
||||
connection?: ExecutionParams;
|
||||
}
|
||||
export interface ApolloServerExpressConfig extends Config {
|
||||
context?: ContextFunction<ExpressContext, Context> | Context;
|
||||
}
|
||||
export declare class ApolloServer extends ApolloServerBase {
|
||||
constructor(config: ApolloServerExpressConfig);
|
||||
createGraphQLServerOptions(req: express.Request, res: express.Response): Promise<GraphQLOptions>;
|
||||
protected supportsSubscriptions(): boolean;
|
||||
protected supportsUploads(): boolean;
|
||||
applyMiddleware({ app, ...rest }: ServerRegistration): void;
|
||||
getMiddleware({ path, cors, bodyParserConfig, disableHealthCheck, onHealthCheck, }?: GetMiddlewareOptions): express.Router;
|
||||
}
|
||||
//# sourceMappingURL=ApolloServer.d.ts.map
|
||||
1
node_modules/apollo-server-express/dist/ApolloServer.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/ApolloServer.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
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CAAC,OAAO,EACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,GACpB,OAAO,CAAC,cAAc,CAAC;IAI1B,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAI1C,SAAS,CAAC,eAAe,IAAI,OAAO;IAI7B,eAAe,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB;IAOpD,aAAa,CAAC,EACnB,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM;CA8F9C"}
|
||||
143
node_modules/apollo-server-express/dist/ApolloServer.js
generated
vendored
Normal file
143
node_modules/apollo-server-express/dist/ApolloServer.js
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __rest = (this && this.__rest) || function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ApolloServer = void 0;
|
||||
const express_1 = __importDefault(require("express"));
|
||||
const cors_1 = __importDefault(require("cors"));
|
||||
const body_parser_1 = require("body-parser");
|
||||
const graphql_playground_html_1 = require("@apollographql/graphql-playground-html");
|
||||
const apollo_server_core_1 = require("apollo-server-core");
|
||||
const accepts_1 = __importDefault(require("accepts"));
|
||||
const type_is_1 = __importDefault(require("type-is"));
|
||||
const expressApollo_1 = require("./expressApollo");
|
||||
var apollo_server_core_2 = require("apollo-server-core");
|
||||
Object.defineProperty(exports, "GraphQLExtension", { enumerable: true, get: function () { return apollo_server_core_2.GraphQLExtension; } });
|
||||
const fileUploadMiddleware = (uploadsConfig, server) => (req, res, next) => {
|
||||
if (!server.disableUploads() &&
|
||||
typeof apollo_server_core_1.processFileUploads === 'function' &&
|
||||
type_is_1.default(req, ['multipart/form-data'])) {
|
||||
apollo_server_core_1.processFileUploads(req, res, uploadsConfig)
|
||||
.then(body => {
|
||||
req.body = body;
|
||||
next();
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.status && error.expose)
|
||||
res.status(error.status);
|
||||
next(apollo_server_core_1.formatApolloErrors([error], {
|
||||
formatter: server.requestOptions.formatError,
|
||||
debug: server.requestOptions.debug,
|
||||
}));
|
||||
});
|
||||
}
|
||||
else {
|
||||
next();
|
||||
}
|
||||
};
|
||||
class ApolloServer extends apollo_server_core_1.ApolloServerBase {
|
||||
constructor(config) {
|
||||
super(config);
|
||||
}
|
||||
createGraphQLServerOptions(req, res) {
|
||||
const _super = Object.create(null, {
|
||||
graphQLServerOptions: { get: () => super.graphQLServerOptions }
|
||||
});
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return _super.graphQLServerOptions.call(this, { req, res });
|
||||
});
|
||||
}
|
||||
supportsSubscriptions() {
|
||||
return true;
|
||||
}
|
||||
supportsUploads() {
|
||||
return true;
|
||||
}
|
||||
applyMiddleware(_a) {
|
||||
var { app } = _a, rest = __rest(_a, ["app"]);
|
||||
app.use(this.getMiddleware(rest));
|
||||
}
|
||||
getMiddleware({ path, cors, bodyParserConfig, disableHealthCheck, onHealthCheck, } = {}) {
|
||||
if (!path)
|
||||
path = '/graphql';
|
||||
this.ensureStarting();
|
||||
const router = express_1.default.Router();
|
||||
if (!disableHealthCheck) {
|
||||
router.use('/.well-known/apollo/server-health', (req, res) => {
|
||||
res.type('application/health+json');
|
||||
if (onHealthCheck) {
|
||||
onHealthCheck(req)
|
||||
.then(() => {
|
||||
res.json({ status: 'pass' });
|
||||
})
|
||||
.catch(() => {
|
||||
res.status(503).json({ status: 'fail' });
|
||||
});
|
||||
}
|
||||
else {
|
||||
res.json({ status: 'pass' });
|
||||
}
|
||||
});
|
||||
}
|
||||
let uploadsMiddleware;
|
||||
if (this.uploadsConfig && typeof apollo_server_core_1.processFileUploads === 'function') {
|
||||
uploadsMiddleware = fileUploadMiddleware(this.uploadsConfig, this);
|
||||
}
|
||||
this.graphqlPath = path;
|
||||
if (cors === true) {
|
||||
router.use(path, cors_1.default());
|
||||
}
|
||||
else if (cors !== false) {
|
||||
router.use(path, cors_1.default(cors));
|
||||
}
|
||||
if (bodyParserConfig === true) {
|
||||
router.use(path, body_parser_1.json());
|
||||
}
|
||||
else if (bodyParserConfig !== false) {
|
||||
router.use(path, body_parser_1.json(bodyParserConfig));
|
||||
}
|
||||
if (uploadsMiddleware) {
|
||||
router.use(path, uploadsMiddleware);
|
||||
}
|
||||
router.use(path, (req, res, next) => {
|
||||
if (this.playgroundOptions && req.method === 'GET') {
|
||||
const accept = accepts_1.default(req);
|
||||
const types = accept.types();
|
||||
const prefersHTML = types.find((x) => x === 'text/html' || x === 'application/json') === 'text/html';
|
||||
if (prefersHTML) {
|
||||
const playgroundRenderPageOptions = Object.assign({ endpoint: req.originalUrl, subscriptionEndpoint: this.subscriptionsPath }, this.playgroundOptions);
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
const playground = graphql_playground_html_1.renderPlaygroundPage(playgroundRenderPageOptions);
|
||||
res.write(playground);
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return expressApollo_1.graphqlExpress(() => this.createGraphQLServerOptions(req, res))(req, res, next);
|
||||
});
|
||||
return router;
|
||||
}
|
||||
}
|
||||
exports.ApolloServer = ApolloServer;
|
||||
//# sourceMappingURL=ApolloServer.js.map
|
||||
1
node_modules/apollo-server-express/dist/ApolloServer.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/ApolloServer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ApolloServer.js","sourceRoot":"","sources":["../src/ApolloServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA8B;AAC9B,gDAAkC;AAClC,6CAAgD;AAChD,oFAGgD;AAChD,2DAS4B;AAE5B,sDAA8B;AAC9B,sDAA6B;AAC7B,mDAAiD;AAEjD,yDAAsE;AAA7C,sHAAA,gBAAgB,OAAA;AAoBzC,MAAM,oBAAoB,GAAG,CAC3B,aAAgC,EAChC,MAAwB,EACxB,EAAE,CAAC,CACH,GAAoB,EACpB,GAAqB,EACrB,IAA0B,EAC1B,EAAE;IAEF,IACE,CAAC,MAAM,CAAC,cAAc,EAAE;QACxB,OAAO,uCAAkB,KAAK,UAAU;QACxC,iBAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,CAAC,EACpC;QACA,uCAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC;aACxC,IAAI,CAAC,IAAI,CAAC,EAAE;YACX,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;YAChB,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM;gBAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC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EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAClC,IAAI,IAAI,CAAC,iBAAiB,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,EAAE;gBAIlD,MAAM,MAAM,GAAG,iBAAO,CAAC,GAAG,CAAC,CAAC;gBAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAc,CAAC;gBACzC,MAAM,WAAW,GACf,KAAK,CAAC,IAAI,CACR,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,WAAW,IAAI,CAAC,KAAK,kBAAkB,CAC7D,KAAK,WAAW,CAAC;gBAEpB,IAAI,WAAW,EAAE;oBACf,MAAM,2BAA2B,mBAC/B,QAAQ,EAAE,GAAG,CAAC,WAAW,EACzB,oBAAoB,EAAE,IAAI,CAAC,iBAAiB,IACzC,IAAI,CAAC,iBAAiB,CAC1B,CAAC;oBACF,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;oBAC3C,MAAM,UAAU,GAAG,8CAAoB,CAAC,2BAA2B,CAAC,CAAC;oBACrE,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;oBACtB,GAAG,CAAC,GAAG,EAAE,CAAC;oBACV,OAAO;iBACR;aACF;YAED,OAAO,8BAAc,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CACpE,GAAG,EACH,GAAG,EACH,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAlID,oCAkIC"}
|
||||
3
node_modules/apollo-server-express/dist/connectApollo.d.ts
generated
vendored
Normal file
3
node_modules/apollo-server-express/dist/connectApollo.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { graphqlExpress } from './expressApollo';
|
||||
export declare const graphqlConnect: typeof graphqlExpress;
|
||||
//# sourceMappingURL=connectApollo.d.ts.map
|
||||
1
node_modules/apollo-server-express/dist/connectApollo.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/connectApollo.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"connectApollo.d.ts","sourceRoot":"","sources":["../src/connectApollo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,eAAO,MAAM,cAAc,uBAAiB,CAAC"}
|
||||
6
node_modules/apollo-server-express/dist/connectApollo.js
generated
vendored
Normal file
6
node_modules/apollo-server-express/dist/connectApollo.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.graphqlConnect = void 0;
|
||||
const expressApollo_1 = require("./expressApollo");
|
||||
exports.graphqlConnect = expressApollo_1.graphqlExpress;
|
||||
//# sourceMappingURL=connectApollo.js.map
|
||||
1
node_modules/apollo-server-express/dist/connectApollo.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/connectApollo.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"connectApollo.js","sourceRoot":"","sources":["../src/connectApollo.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAEpC,QAAA,cAAc,GAAG,8BAAc,CAAC"}
|
||||
8
node_modules/apollo-server-express/dist/expressApollo.d.ts
generated
vendored
Normal file
8
node_modules/apollo-server-express/dist/expressApollo.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import express from 'express';
|
||||
import { GraphQLOptions } from 'apollo-server-core';
|
||||
import { ValueOrPromise } from 'apollo-server-types';
|
||||
export interface ExpressGraphQLOptionsFunction {
|
||||
(req: express.Request, res: express.Response): ValueOrPromise<GraphQLOptions>;
|
||||
}
|
||||
export declare function graphqlExpress(options: GraphQLOptions | ExpressGraphQLOptionsFunction): express.Handler;
|
||||
//# sourceMappingURL=expressApollo.d.ts.map
|
||||
1
node_modules/apollo-server-express/dist/expressApollo.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/expressApollo.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"expressApollo.d.ts","sourceRoot":"","sources":["../src/expressApollo.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EACL,cAAc,EAIf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,WAAW,6BAA6B;IAC5C,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;CAC/E;AAOD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,cAAc,GAAG,6BAA6B,GACtD,OAAO,CAAC,OAAO,CAuDjB"}
|
||||
50
node_modules/apollo-server-express/dist/expressApollo.js
generated
vendored
Normal file
50
node_modules/apollo-server-express/dist/expressApollo.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.graphqlExpress = void 0;
|
||||
const apollo_server_core_1 = require("apollo-server-core");
|
||||
function graphqlExpress(options) {
|
||||
if (!options) {
|
||||
throw new Error('Apollo Server requires options.');
|
||||
}
|
||||
if (arguments.length > 1) {
|
||||
throw new Error(`Apollo Server expects exactly one argument, got ${arguments.length}`);
|
||||
}
|
||||
return (req, res, next) => {
|
||||
apollo_server_core_1.runHttpQuery([req, res], {
|
||||
method: req.method,
|
||||
options: options,
|
||||
query: req.method === 'POST' ? req.body : req.query,
|
||||
request: apollo_server_core_1.convertNodeHttpToRequest(req),
|
||||
}).then(({ graphqlResponse, responseInit }) => {
|
||||
if (responseInit.headers) {
|
||||
for (const [name, value] of Object.entries(responseInit.headers)) {
|
||||
res.setHeader(name, value);
|
||||
}
|
||||
}
|
||||
if (typeof res.send === 'function') {
|
||||
res.send(graphqlResponse);
|
||||
}
|
||||
else {
|
||||
res.end(graphqlResponse);
|
||||
}
|
||||
}, (error) => {
|
||||
if ('HttpQueryError' !== error.name) {
|
||||
return next(error);
|
||||
}
|
||||
if (error.headers) {
|
||||
for (const [name, value] of Object.entries(error.headers)) {
|
||||
res.setHeader(name, value);
|
||||
}
|
||||
}
|
||||
res.statusCode = error.statusCode;
|
||||
if (typeof res.send === 'function') {
|
||||
res.send(error.message);
|
||||
}
|
||||
else {
|
||||
res.end(error.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
exports.graphqlExpress = graphqlExpress;
|
||||
//# sourceMappingURL=expressApollo.js.map
|
||||
1
node_modules/apollo-server-express/dist/expressApollo.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/expressApollo.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"expressApollo.js","sourceRoot":"","sources":["../src/expressApollo.ts"],"names":[],"mappings":";;;AACA,2DAK4B;AAY5B,SAAgB,cAAc,CAC5B,OAAuD;IAEvD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;KACpD;IAED,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,MAAM,IAAI,KAAK,CACb,mDAAmD,SAAS,CAAC,MAAM,EAAE,CACtE,CAAC;KACH;IAED,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAQ,EAAE;QAC9B,iCAAY,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;YACvB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK;YACnD,OAAO,EAAE,6CAAwB,CAA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ist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export { GraphQLUpload, GraphQLOptions, GraphQLExtension, Config, gql, ApolloError, toApolloError, SyntaxError, ValidationError, AuthenticationError, ForbiddenError, UserInputError, defaultPlaygroundOptions, PlaygroundConfig, PlaygroundRenderPageOptions, } from 'apollo-server-core';
|
||||
export * from 'graphql-tools';
|
||||
export * from 'graphql-subscriptions';
|
||||
export { ApolloServer, ServerRegistration, GetMiddlewareOptions, ApolloServerExpressConfig, ExpressContext, } from './ApolloServer';
|
||||
export { CorsOptions } from 'cors';
|
||||
export { OptionsJson } from 'body-parser';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/apollo-server-express/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,GAAG,EAEH,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EAEd,wBAAwB,EACxB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
||||
29
node_modules/apollo-server-express/dist/index.js
generated
vendored
Normal file
29
node_modules/apollo-server-express/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var apollo_server_core_1 = require("apollo-server-core");
|
||||
Object.defineProperty(exports, "GraphQLUpload", { enumerable: true, get: function () { return apollo_server_core_1.GraphQLUpload; } });
|
||||
Object.defineProperty(exports, "GraphQLExtension", { enumerable: true, get: function () { return apollo_server_core_1.GraphQLExtension; } });
|
||||
Object.defineProperty(exports, "gql", { enumerable: true, get: function () { return apollo_server_core_1.gql; } });
|
||||
Object.defineProperty(exports, "ApolloError", { enumerable: true, get: function () { return apollo_server_core_1.ApolloError; } });
|
||||
Object.defineProperty(exports, "toApolloError", { enumerable: true, get: function () { return apollo_server_core_1.toApolloError; } });
|
||||
Object.defineProperty(exports, "SyntaxError", { enumerable: true, get: function () { return apollo_server_core_1.SyntaxError; } });
|
||||
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return apollo_server_core_1.ValidationError; } });
|
||||
Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return apollo_server_core_1.AuthenticationError; } });
|
||||
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return apollo_server_core_1.ForbiddenError; } });
|
||||
Object.defineProperty(exports, "UserInputError", { enumerable: true, get: function () { return apollo_server_core_1.UserInputError; } });
|
||||
Object.defineProperty(exports, "defaultPlaygroundOptions", { enumerable: true, get: function () { return apollo_server_core_1.defaultPlaygroundOptions; } });
|
||||
__exportStar(require("graphql-tools"), exports);
|
||||
__exportStar(require("graphql-subscriptions"), exports);
|
||||
var ApolloServer_1 = require("./ApolloServer");
|
||||
Object.defineProperty(exports, "ApolloServer", { enumerable: true, get: function () { return ApolloServer_1.ApolloServer; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/apollo-server-express/dist/index.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-express/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAkB4B;AAjB1B,mHAAA,aAAa,OAAA;AAEb,sHAAA,gBAAgB,OAAA;AAEhB,yGAAA,GAAG,OAAA;AAEH,iHAAA,WAAW,OAAA;AACX,mHAAA,aAAa,OAAA;AACb,iHAAA,WAAW,OAAA;AACX,qHAAA,eAAe,OAAA;AACf,yHAAA,mBAAmB,OAAA;AACnB,oHAAA,cAAc,OAAA;AACd,oHAAA,cAAc,OAAA;AAEd,8HAAA,wBAAwB,OAAA;AAK1B,gDAA8B;AAC9B,wDAAsC;AAGtC,+CAMwB;AALtB,4GAAA,YAAY,OAAA"}
|
||||
Reference in New Issue
Block a user