Socket
Socket
Sign inDemoInstall

graphql-playground-middleware-koa

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-playground-middleware-koa - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

1

dist/index.d.ts

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

/// <reference types="koa" />
import { Context } from 'koa';

@@ -2,0 +3,0 @@ import { MiddlewareOptions } from 'graphql-playground-html';

29

dist/index.js

@@ -48,23 +48,26 @@ "use strict";

/* tslint:disable-next-line */
var version = require('../package.json').version;
var playgroundVersion = require('../package.json').playgroundVersion;
var koa = function (options) {
var middlewareOptions = __assign({}, options, { version: version });
var middlewareOptions = __assign({}, options, { version: playgroundVersion });
return function voyager(ctx, next) {
return __awaiter(this, void 0, void 0, function () {
var err_1;
return __generator(this, function (_a) {
switch (_a.label) {
var _a, err_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a.trys.push([0, 2, , 3]);
ctx.body = graphql_playground_html_1.renderPlaygroundPage(middlewareOptions);
_b.trys.push([0, 3, , 4]);
_a = ctx;
return [4 /*yield*/, graphql_playground_html_1.renderPlaygroundPage(middlewareOptions)];
case 1:
_a.body = _b.sent();
return [4 /*yield*/, next()];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
err_1 = _a.sent();
_b.sent();
return [3 /*break*/, 4];
case 3:
err_1 = _b.sent();
ctx.body = { message: err_1.message };
ctx.status = err_1.status || 500;
return [3 /*break*/, 3];
case 3: return [2 /*return*/];
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}

@@ -71,0 +74,0 @@ });

{
"name": "graphql-playground-middleware-koa",
"version": "1.3.6",
"homepage":
"https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-koa",
"description":
"GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"version": "1.3.7",
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-koa",
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [

@@ -16,8 +14,17 @@ "Tim Suchanek <tim@graph.cool>",

"main": "dist/index.js",
"files": ["dist"],
"files": [
"dist"
],
"playgroundVersion": "1.3.22",
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
"build": "rimraf dist && tsc",
"prepare": "npm run build"
},
"keywords": ["graphql", "graphiql", "playground", "graphcool", "koa"],
"keywords": [
"graphql",
"graphiql",
"playground",
"graphcool",
"koa"
],
"peerDependencies": {

@@ -27,4 +34,5 @@ "koa": "^2.3.0"

"devDependencies": {
"@types/node": "^8.0.47",
"typescript": "^2.6.1"
"@types/node": "8.5.5",
"rimraf": "2.6.2",
"typescript": "2.6.2"
},

@@ -37,5 +45,4 @@ "typings": "dist/index.d.ts",

"graphql-playground-html": "^1.3.6",
"graphql-playground-middleware": "^1.2.1-beta.6",
"koa": "^2.4.1"
}
}

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