diff --git a/packages/graphql-playground-html/package.json b/packages/graphql-playground-html/package.json
index 2702058bc..d8d8cc0c7 100644
--- a/packages/graphql-playground-html/package.json
+++ b/packages/graphql-playground-html/package.json
@@ -1,6 +1,6 @@
{
"name": "graphql-playground-html",
- "version": "1.3.5",
+ "version": "1.3.6",
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html",
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
diff --git a/packages/graphql-playground-html/src/render-playground-page.ts b/packages/graphql-playground-html/src/render-playground-page.ts
index 3cde11d02..37b94ebc8 100644
--- a/packages/graphql-playground-html/src/render-playground-page.ts
+++ b/packages/graphql-playground-html/src/render-playground-page.ts
@@ -20,15 +20,23 @@ export interface RenderPageOptions extends MiddlewareOptions {
env?: any
}
-const config = getGraphQLConfig().config
-const configPath = findGraphQLConfigFile(process.cwd())
-const configString = fs.readFileSync(configPath, 'utf-8')
-const folderName = path.basename(process.cwd())
-const env = getUsedEnvs(config)
-
const loading = getLoadingMarkup()
export function renderPlaygroundPage(options: RenderPageOptions) {
+ let config
+ let configPath
+ let configString
+ let folderName
+ let env
+ try {
+ config = getGraphQLConfig().config
+ configPath = findGraphQLConfigFile(process.cwd())
+ configString = fs.readFileSync(configPath, 'utf-8')
+ folderName = path.basename(process.cwd())
+ env = getUsedEnvs(config)
+ } catch (e) {
+ //
+ }
const extendedOptions = {
...options,
configString,
@@ -36,6 +44,12 @@ export function renderPlaygroundPage(options: RenderPageOptions) {
canSaveConfig: false,
env,
}
+ if (!extendedOptions.endpoint && !extendedOptions.configString) {
+ /* tslint:disable-next-line */
+ console.warn(
+ `WARNING: You didn't provide an endpoint and don't have a .graphqlconfig. Make sure you have at least one of them.`,
+ )
+ }
return `
diff --git a/packages/graphql-playground-middleware-express/examples/basic/.graphqlconfig.yml b/packages/graphql-playground-middleware-express/examples/basic/old.graphqlconfig.yml
similarity index 100%
rename from packages/graphql-playground-middleware-express/examples/basic/.graphqlconfig.yml
rename to packages/graphql-playground-middleware-express/examples/basic/old.graphqlconfig.yml
diff --git a/packages/graphql-playground-middleware-express/package.json b/packages/graphql-playground-middleware-express/package.json
index a03530220..a21c1e0a0 100644
--- a/packages/graphql-playground-middleware-express/package.json
+++ b/packages/graphql-playground-middleware-express/package.json
@@ -1,8 +1,10 @@
{
"name": "graphql-playground-middleware-express",
- "version": "1.3.5",
- "homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-express",
- "description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
+ "version": "1.3.6",
+ "homepage":
+ "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-express",
+ "description":
+ "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
"Tim Suchanek ",
"Johannes Schickling ",
@@ -11,19 +13,12 @@
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "SEE LICENSE IN LICENSE",
"main": "dist/index.js",
- "files": [
- "dist"
- ],
+ "files": ["dist"],
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
},
- "keywords": [
- "graphql",
- "graphiql",
- "playground",
- "graphcool"
- ],
+ "keywords": ["graphql", "graphiql", "playground", "graphcool"],
"peerDependencies": {
"express": "^4.16.2"
},
@@ -32,7 +27,7 @@
"typescript": "^2.6.1"
},
"dependencies": {
- "graphql-playground-html": "^1.3.5",
+ "graphql-playground-html": "^1.3.6",
"graphql-playground-middleware": "^1.2.1-beta.6"
},
"typings": "dist/index.d.ts",
diff --git a/packages/graphql-playground-middleware-express/yarn.lock b/packages/graphql-playground-middleware-express/yarn.lock
index dff70796e..57552f1db 100644
--- a/packages/graphql-playground-middleware-express/yarn.lock
+++ b/packages/graphql-playground-middleware-express/yarn.lock
@@ -75,9 +75,9 @@ graphql-config@^1.0.9:
minimatch "^3.0.4"
rimraf "^2.6.2"
-graphql-playground-html@^1.3.5:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.5.tgz#962ea7b39682e2285712feb481ff06ea560cf900"
+graphql-playground-html@^1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.6.tgz#3db97d5d7e7123cf62a86820b0be5d4b4092af4a"
dependencies:
graphql-config "^1.0.9"
diff --git a/packages/graphql-playground-middleware-hapi/package.json b/packages/graphql-playground-middleware-hapi/package.json
index 6bc4da964..c3c72bc17 100644
--- a/packages/graphql-playground-middleware-hapi/package.json
+++ b/packages/graphql-playground-middleware-hapi/package.json
@@ -1,8 +1,10 @@
{
"name": "graphql-playground-middleware-hapi",
- "version": "1.3.5",
- "homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-hapi",
- "description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
+ "version": "1.3.6",
+ "homepage":
+ "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-hapi",
+ "description":
+ "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
"Tim Suchanek ",
"Johannes Schickling ",
@@ -11,20 +13,12 @@
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "SEE LICENSE IN LICENSE",
"main": "dist/index.js",
- "files": [
- "dist"
- ],
+ "files": ["dist"],
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
},
- "keywords": [
- "graphql",
- "graphiql",
- "playground",
- "graphcool",
- "hapi"
- ],
+ "keywords": ["graphql", "graphiql", "playground", "graphcool", "hapi"],
"peerDependencies": {
"hapi": "^16.6.2"
},
@@ -37,7 +31,7 @@
"definition": "dist/index.d.ts"
},
"dependencies": {
- "graphql-playground-html": "^1.3.5",
+ "graphql-playground-html": "^1.3.6",
"graphql-playground-middleware": "^1.2.1-beta.6"
}
}
diff --git a/packages/graphql-playground-middleware-hapi/yarn.lock b/packages/graphql-playground-middleware-hapi/yarn.lock
index dff70796e..57552f1db 100644
--- a/packages/graphql-playground-middleware-hapi/yarn.lock
+++ b/packages/graphql-playground-middleware-hapi/yarn.lock
@@ -75,9 +75,9 @@ graphql-config@^1.0.9:
minimatch "^3.0.4"
rimraf "^2.6.2"
-graphql-playground-html@^1.3.5:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.5.tgz#962ea7b39682e2285712feb481ff06ea560cf900"
+graphql-playground-html@^1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.6.tgz#3db97d5d7e7123cf62a86820b0be5d4b4092af4a"
dependencies:
graphql-config "^1.0.9"
diff --git a/packages/graphql-playground-middleware-koa/package.json b/packages/graphql-playground-middleware-koa/package.json
index 54fe130c6..8ae05ce52 100644
--- a/packages/graphql-playground-middleware-koa/package.json
+++ b/packages/graphql-playground-middleware-koa/package.json
@@ -1,8 +1,10 @@
{
"name": "graphql-playground-middleware-koa",
- "version": "1.3.5",
- "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.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).",
"contributors": [
"Tim Suchanek ",
"Johannes Schickling ",
@@ -11,20 +13,12 @@
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "SEE LICENSE IN LICENSE",
"main": "dist/index.js",
- "files": [
- "dist"
- ],
+ "files": ["dist"],
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
},
- "keywords": [
- "graphql",
- "graphiql",
- "playground",
- "graphcool",
- "koa"
- ],
+ "keywords": ["graphql", "graphiql", "playground", "graphcool", "koa"],
"peerDependencies": {
"koa": "^2.3.0"
},
@@ -37,7 +31,7 @@
"definition": "dist/index.d.ts"
},
"dependencies": {
- "graphql-playground-html": "^1.3.5",
+ "graphql-playground-html": "^1.3.6",
"graphql-playground-middleware": "^1.2.1-beta.6",
"koa": "^2.4.1"
}
diff --git a/packages/graphql-playground-middleware-koa/yarn.lock b/packages/graphql-playground-middleware-koa/yarn.lock
index 9524e5b9c..d3482fc30 100644
--- a/packages/graphql-playground-middleware-koa/yarn.lock
+++ b/packages/graphql-playground-middleware-koa/yarn.lock
@@ -143,9 +143,9 @@ graphql-config@^1.0.9:
minimatch "^3.0.4"
rimraf "^2.6.2"
-graphql-playground-html@^1.3.5:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.5.tgz#962ea7b39682e2285712feb481ff06ea560cf900"
+graphql-playground-html@^1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.6.tgz#3db97d5d7e7123cf62a86820b0be5d4b4092af4a"
dependencies:
graphql-config "^1.0.9"
diff --git a/packages/graphql-playground-middleware-lambda/package.json b/packages/graphql-playground-middleware-lambda/package.json
index 531953097..ad0b230ae 100644
--- a/packages/graphql-playground-middleware-lambda/package.json
+++ b/packages/graphql-playground-middleware-lambda/package.json
@@ -1,8 +1,10 @@
{
"name": "graphql-playground-middleware-lambda",
- "version": "1.3.5",
- "homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-lambada",
- "description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
+ "version": "1.3.6",
+ "homepage":
+ "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-lambada",
+ "description":
+ "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
"contributors": [
"Tim Suchanek ",
"Johannes Schickling ",
@@ -11,20 +13,12 @@
"repository": "http://github.com/graphcool/graphql-playground.git",
"license": "SEE LICENSE IN LICENSE",
"main": "dist/index.js",
- "files": [
- "dist"
- ],
+ "files": ["dist"],
"scripts": {
"build": "tsc",
"prepublishOnly": "npm run build"
},
- "keywords": [
- "graphql",
- "graphiql",
- "playground",
- "graphcool",
- "lambada"
- ],
+ "keywords": ["graphql", "graphiql", "playground", "graphcool", "lambada"],
"peerDependencies": {
"aws-lambda": "^0.1.2"
},
@@ -37,7 +31,7 @@
"definition": "dist/index.d.ts"
},
"dependencies": {
- "graphql-playground-html": "^1.3.5",
+ "graphql-playground-html": "^1.3.6",
"graphql-playground-middleware": "^1.2.1-beta.6"
}
}
diff --git a/packages/graphql-playground-middleware-lambda/yarn.lock b/packages/graphql-playground-middleware-lambda/yarn.lock
index dff70796e..57552f1db 100644
--- a/packages/graphql-playground-middleware-lambda/yarn.lock
+++ b/packages/graphql-playground-middleware-lambda/yarn.lock
@@ -75,9 +75,9 @@ graphql-config@^1.0.9:
minimatch "^3.0.4"
rimraf "^2.6.2"
-graphql-playground-html@^1.3.5:
- version "1.3.5"
- resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.5.tgz#962ea7b39682e2285712feb481ff06ea560cf900"
+graphql-playground-html@^1.3.6:
+ version "1.3.6"
+ resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.6.tgz#3db97d5d7e7123cf62a86820b0be5d4b4092af4a"
dependencies:
graphql-config "^1.0.9"