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

graphql-playground-middleware

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-playground-middleware - npm Package Compare versions

Comparing version 1.1.2 to 1.2.1-beta.4

7

dist/index.d.ts

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

import { default as expressPlayground } from './express';
import { default as hapiPlayground } from './hapi';
import { default as koaPlayground } from './koa';
import { default as renderPlaygroundPage } from './render-playground-page';
import { default as lambdaPlayground } from './lambda';
export { expressPlayground, hapiPlayground, koaPlayground, renderPlaygroundPage, lambdaPlayground };
export { renderPlaygroundPage, MiddlewareOptions } from './render-playground-page';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var express_1 = require("./express");
exports.expressPlayground = express_1.default;
var hapi_1 = require("./hapi");
exports.hapiPlayground = hapi_1.default;
var koa_1 = require("./koa");
exports.koaPlayground = koa_1.default;
var render_playground_page_1 = require("./render-playground-page");
exports.renderPlaygroundPage = render_playground_page_1.default;
var lambda_1 = require("./lambda");
exports.lambdaPlayground = lambda_1.default;
exports.renderPlaygroundPage = render_playground_page_1.renderPlaygroundPage;
//# sourceMappingURL=index.js.map

6

dist/render-playground-page.d.ts
export interface MiddlewareOptions {
version: string;
endpoint: string;
subscriptionEndpoint?: string;
version: string;
setTitle?: string;
folderName?: string;
}
export default function renderPlaygroundPage(options: MiddlewareOptions): string;
export declare function renderPlaygroundPage(options: MiddlewareOptions): string;
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var fs = require("fs");
var findUp = require("find-up");
var configPath = findUp.sync(['.graphqlconfig', '.graphqlconfig.yml']);
var configString = configPath
? fs.readFileSync(configPath, 'utf-8')
: undefined;
var folderName = configPath
? path.basename(path.dirname(configPath))
: undefined;
function renderPlaygroundPage(options) {
return "\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <title>GraphQL Playground</title>\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/js/middleware.js\"></script>\n</head>\n<body>\n<div id=\"root\">\n <style>\n body {\n background-color: rgb(23,42,58);\n font-family: Open Sans,sans-serif;\n height: 90vh;\n }\n #root {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .loading {\n font-size: 32px;\n font-weight: 200;\n color: rgba(255,255,255,.6);\n margin-left: 20px;\n }\n img {\n width: 78px;\n height: 78px;\n }\n .title {\n font-weight: 400;\n }\n </style>\n <img src='http://cdn.jsdelivr.net/npm/graphql-playground/build/logo.png' alt=''>\n <div class=\"loading\">\n Loading <span class=\"title\">GraphQL Playground</span>\n </div>\n</div>\n <script>\n window.addEventListener('load', function(event) {\n GraphQLPlayground.init(document.getElementById('root'), " + JSON.stringify(options, null, 2) + ")\n })\n </script>\n</body>\n</html>\n";
var extendedOptions = __assign({}, options, { configString: configString,
folderName: folderName, canSaveConfig: false });
return "\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <title>GraphQL Playground</title>\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/js/middleware.js\"></script>\n</head>\n<body>\n<div id=\"root\">\n <style>\n body {\n background-color: rgb(23,42,58);\n font-family: Open Sans,sans-serif;\n height: 90vh;\n }\n #root {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .loading {\n font-size: 32px;\n font-weight: 200;\n color: rgba(255,255,255,.6);\n margin-left: 20px;\n }\n img {\n width: 78px;\n height: 78px;\n }\n .title {\n font-weight: 400;\n }\n </style>\n <img src='//cdn.jsdelivr.net/npm/graphql-playground/build/logo.png' alt=''>\n <div class=\"loading\">\n Loading <span class=\"title\">GraphQL Playground</span>\n </div>\n</div>\n <script>\n window.addEventListener('load', function(event) {\n GraphQLPlayground.init(document.getElementById('root'), " + JSON.stringify(extendedOptions, null, 2) + ")\n })\n </script>\n</body>\n</html>\n";
}
exports.default = renderPlaygroundPage;
exports.renderPlaygroundPage = renderPlaygroundPage;
//# sourceMappingURL=render-playground-page.js.map
{
"name": "graphql-playground-middleware",
"version": "1.1.2",
"version": "1.2.1-beta.4",
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware",

@@ -8,3 +8,4 @@ "description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",

"Tim Suchanek <tim@graph.cool>",
"Johannes Schickling <johannes@graph.cool>"
"Johannes Schickling <johannes@graph.cool>",
"Mohammad Rajabifard <mo.rajbi@gmail.com>"
],

@@ -21,9 +22,13 @@ "repository": "http://github.com/graphcool/graphql-playground.git",

},
"keywords": [],
"keywords": [
"graphql",
"graphiql",
"playground",
"graphcool"
],
"peerDependencies": {
"express": "^4.16.2"
},
"devDependencies": {
"@types/node": "^8.0.47",
"aws-lambda": "^0.1.2",
"express": "^4.16.2",
"hapi": "^16.6.2",
"koa": "^2.3.0",
"typescript": "^2.6.1"

@@ -34,3 +39,6 @@ },

"definition": "dist/index.d.ts"
},
"dependencies": {
"find-up": "^2.1.0"
}
}

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