Skip to content

Commit 00c11ee

Browse files
committed
add debugging functionality
1 parent 4ddd58c commit 00c11ee

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

packages/graphql-playground-electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"extract-text-webpack-plugin": "^2.0.0-beta.3",
139139
"file-loader": "^0.11.2",
140140
"fork-ts-checker-webpack-plugin": "^0.1.5",
141-
"graphql-playground": "^1.3.4",
141+
"graphql-playground": "^1.3.5-alpha.1",
142142
"happypack": "^3.1.0",
143143
"html-webpack-plugin": "^2.30.1",
144144
"identity-obj-proxy": "^3.0.0",

packages/graphql-playground-electron/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3338,9 +3338,9 @@ [email protected]:
33383338
graphql "^0.10.1"
33393339
graphql-language-service-types "0.0.21"
33403340

3341-
graphql-playground@^1.3.4:
3342-
version "1.3.4"
3343-
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.3.4.tgz#55d87f75d81f20b97ad23dd25ac15fe009654da9"
3341+
graphql-playground@^1.3.5-alpha.1:
3342+
version "1.3.5-alpha.1"
3343+
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.3.5-alpha.1.tgz#bed4e4d53a69059ab694b0af854819d9eff5e95c"
33443344
dependencies:
33453345
calculate-size "^1.1.1"
33463346
classnames "^2.2.5"

packages/graphql-playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground",
3-
"version": "1.3.4",
3+
"version": "1.3.5-alpha.1",
44
"main": "./lib/lib.js",
55
"typings": "./lib/lib.d.ts",
66
"description":

packages/graphql-playground/src/components/MiddlewareApp.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,25 @@ class MiddlewareApp extends React.Component<Props, State> {
7676
playground: IPlayground
7777
constructor(props: Props) {
7878
super(props)
79+
;(global as any).m = this
7980

8081
let settings = localStorage.getItem('settings') || defaultSettings
8182
settings = this.migrateSettingsString(settings)
8283

8384
let config
8485
let configIsYaml
8586

86-
if (props.configString) {
87-
const result = this.parseGraphQLConfig(props.configString)
88-
config = result.config
89-
configIsYaml = result.configIsYaml
87+
try {
88+
if (props.configString) {
89+
const result = this.parseGraphQLConfig(props.configString, props.env)
90+
config = result.config
91+
configIsYaml = result.configIsYaml
92+
}
93+
} catch (e) {
94+
/* tslint:disable-next-line */
95+
console.error(props)
96+
/* tslint:disable-next-line */
97+
console.error(e)
9098
}
9199

92100
const { activeEnv, projectName } = this.getInitialActiveEnv(config)

0 commit comments

Comments
 (0)