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

graphql-server-core

Package Overview
Dependencies
Maintainers
4
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-server-core - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

README.md

1

dist/graphqlOptions.d.ts

@@ -15,2 +15,3 @@ import { GraphQLSchema, ValidationContext } from 'graphql';

export default GraphQLServerOptions;
export declare function resolveGraphqlOptions(options: GraphQLServerOptions | Function, ...args: any[]): Promise<GraphQLServerOptions>;
export declare function isOptionsFunction(arg: GraphQLServerOptions | Function): arg is Function;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
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) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t;
return { next: verb(0), "throw": verb(1), "return": verb(2) };
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
function resolveGraphqlOptions(options) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!isOptionsFunction(options)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, options.apply(void 0, args)];
case 2: return [2 /*return*/, _a.sent()];
case 3:
e_1 = _a.sent();
throw new Error("Invalid options provided to ApolloServer: " + e_1.message);
case 4: return [3 /*break*/, 6];
case 5: return [2 /*return*/, options];
case 6: return [2 /*return*/];
}
});
});
}
exports.resolveGraphqlOptions = resolveGraphqlOptions;
function isOptionsFunction(arg) {

@@ -3,0 +66,0 @@ return typeof arg === 'function';

2

dist/index.d.ts
export { runQuery, LogFunction, LogMessage, LogStep, LogAction } from './runQuery';
export { runHttpQuery, HttpQueryRequest, HttpQueryError } from './runHttpQuery';
export { default as GraphQLOptions } from './graphqlOptions';
export { default as GraphQLOptions, resolveGraphqlOptions } from './graphqlOptions';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var runQuery_1 = require("./runQuery");

@@ -9,2 +10,4 @@ exports.runQuery = runQuery_1.runQuery;

exports.HttpQueryError = runHttpQuery_1.HttpQueryError;
var graphqlOptions_1 = require("./graphqlOptions");
exports.resolveGraphqlOptions = graphqlOptions_1.resolveGraphqlOptions;
//# sourceMappingURL=index.js.map
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -42,2 +47,3 @@ return new (P || (P = Promise))(function (resolve, reject) {

};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");

@@ -71,7 +77,6 @@ var runQuery_1 = require("./runQuery");

isGetRequest = false;
if (!graphqlOptions_1.isOptionsFunction(request.options)) return [3 /*break*/, 5];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, request.options.apply(request, handlerArguments)];
return [4 /*yield*/, graphqlOptions_1.resolveGraphqlOptions.apply(void 0, [request.options].concat(handlerArguments))];
case 2:

@@ -82,8 +87,4 @@ optionsObject = _a.sent();

e_1 = _a.sent();
throw new HttpQueryError(500, "Invalid options provided to ApolloServer: " + e_1.message);
case 4: return [3 /*break*/, 6];
case 5:
optionsObject = request.options;
_a.label = 6;
case 6:
throw new HttpQueryError(500, e_1.message);
case 4:
formatErrorFn = optionsObject.formatError || graphql_1.formatError;

@@ -167,3 +168,3 @@ switch (request.method) {

return [4 /*yield*/, Promise.all(requests)];
case 7:
case 5:
responses = _a.sent();

@@ -170,0 +171,0 @@ if (!isBatch) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require("graphql");

@@ -3,0 +4,0 @@ var LogAction;

{
"name": "graphql-server-core",
"version": "0.6.0",
"version": "0.7.0",
"description": "Core engine for Apollo GraphQL server",

@@ -28,5 +28,5 @@ "main": "dist/index.js",

"@types/fibers": "0.0.29",
"@types/graphql": "^0.8.5",
"@types/graphql": "^0.9.0",
"fibers": "^1.0.15",
"meteor-promise": "^0.8.0"
"meteor-promise": "^0.8.2"
},

@@ -37,3 +37,3 @@ "peerDependencies": {

"optionalDependencies": {
"@types/graphql": "^0.8.5"
"@types/graphql": "^0.9.0"
},

@@ -40,0 +40,0 @@ "typings": "dist/index.d.ts",

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