Skip to content

Commit 00e894f

Browse files
committed
support older react versions
1 parent 152f1c9 commit 00e894f

File tree

4 files changed

+83
-26
lines changed

4 files changed

+83
-26
lines changed

packages/graphql-playground-electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://github.com/graphcool/graphql-playground",
55
"repository": "graphcool/graphql-playground",
66
"description": "Playground app",
7-
"version": "1.1.1",
7+
"version": "1.1.6",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",
@@ -130,7 +130,7 @@
130130
"extract-text-webpack-plugin": "^2.0.0-beta.3",
131131
"file-loader": "^0.11.2",
132132
"fork-ts-checker-webpack-plugin": "^0.1.5",
133-
"graphql-playground": "^1.1.0",
133+
"graphql-playground": "^1.1.6",
134134
"happypack": "^3.1.0",
135135
"html-webpack-plugin": "^2.30.1",
136136
"identity-obj-proxy": "^3.0.0",

packages/graphql-playground-electron/yarn.lock

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,13 @@ buffer@^4.3.0:
13891389
ieee754 "^1.1.4"
13901390
isarray "^1.0.0"
13911391

1392+
buffer@^5.0.3:
1393+
version "5.0.8"
1394+
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.8.tgz#84daa52e7cf2fa8ce4195bc5cf0f7809e0930b24"
1395+
dependencies:
1396+
base64-js "^1.0.2"
1397+
ieee754 "^1.1.4"
1398+
13921399
builder-util-runtime@~2.1.0:
13931400
version "2.1.0"
13941401
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-2.1.0.tgz#82362a92e202ee8315334391bbb23b2ea9099765"
@@ -1936,6 +1943,10 @@ crypto-random-string@^1.0.0:
19361943
version "1.0.0"
19371944
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
19381945

1946+
css-color-keywords@^1.0.0:
1947+
version "1.0.0"
1948+
resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05"
1949+
19391950
19401951
version "0.0.4"
19411952
resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
@@ -1991,6 +2002,14 @@ css-selector-tokenizer@^0.7.0:
19912002
fastparse "^1.1.1"
19922003
regexpu-core "^1.0.0"
19932004

2005+
css-to-react-native@^2.0.3:
2006+
version "2.0.4"
2007+
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.0.4.tgz#cf4cc407558b3474d4ba8be1a2cd3b6ce713101b"
2008+
dependencies:
2009+
css-color-keywords "^1.0.0"
2010+
fbjs "^0.8.5"
2011+
postcss-value-parser "^3.3.0"
2012+
19942013
19952014
version "2.1.0"
19962015
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd"
@@ -2870,7 +2889,7 @@ faye-websocket@~0.11.0:
28702889
dependencies:
28712890
websocket-driver ">=0.5.1"
28722891

2873-
fbjs@^0.8.16:
2892+
fbjs@^0.8.16, fbjs@^0.8.5:
28742893
version "0.8.16"
28752894
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
28762895
dependencies:
@@ -3311,9 +3330,9 @@ [email protected]:
33113330
graphql "^0.10.1"
33123331
graphql-language-service-types "0.0.21"
33133332

3314-
graphql-playground@^1.1.0:
3315-
version "1.1.0"
3316-
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.1.0.tgz#553063ae343bb7bff1218e5d623acf1fc1ab52b5"
3333+
graphql-playground@^1.1.6:
3334+
version "1.1.6"
3335+
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.1.6.tgz#0e5f07c94519310f560d05d1ad1184d83c11ceb6"
33173336
dependencies:
33183337
calculate-size "^1.1.1"
33193338
classnames "^2.2.5"
@@ -3335,7 +3354,7 @@ graphql-playground@^1.1.0:
33353354
react-dom "^16.0.0"
33363355
react-helmet "^5.2.0"
33373356
react-modal "^3.1.0"
3338-
react-redux "^5.0.5"
3357+
react-redux "^5.0.6"
33393358
react-router-dom "^4.2.2"
33403359
react-transition-group "^1.1.3"
33413360
react-virtualized "^9.12.0"
@@ -3344,6 +3363,7 @@ graphql-playground@^1.1.0:
33443363
redux-localstorage-filter "^0.1.1"
33453364
rxjs "^5.0.3"
33463365
seamless-immutable "^7.0.1"
3366+
styled-components "^2.2.3"
33473367
styled-jsx-postcss "git+https://github.com/timsuchanek/styled-jsx-postcss#build3"
33483368
subscriptions-transport-ws "^0.8.1"
33493369

@@ -3500,6 +3520,10 @@ [email protected]:
35003520
version "4.2.0"
35013521
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
35023522

3523+
hoist-non-react-statics@^1.2.0:
3524+
version "1.2.0"
3525+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
3526+
35033527
hoist-non-react-statics@^2.2.1:
35043528
version "2.2.2"
35053529
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.2.2.tgz#c0eca5a7d5a28c5ada3107eb763b01da6bfa81fb"
@@ -3817,6 +3841,10 @@ is-fullwidth-code-point@^2.0.0:
38173841
version "2.0.0"
38183842
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
38193843

3844+
is-function@^1.0.1:
3845+
version "1.0.1"
3846+
resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5"
3847+
38203848
is-glob@^2.0.0, is-glob@^2.0.1:
38213849
version "2.0.1"
38223850
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
@@ -5733,7 +5761,7 @@ react-proxy@^1.1.7:
57335761
lodash "^4.6.1"
57345762
react-deep-force-update "^1.0.0"
57355763

5736-
react-redux@^5.0.5:
5764+
react-redux@^5.0.5, react-redux@^5.0.6:
57375765
version "5.0.6"
57385766
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946"
57395767
dependencies:
@@ -6643,6 +6671,20 @@ style-loader@^0.18.2:
66436671
loader-utils "^1.0.2"
66446672
schema-utils "^0.3.0"
66456673

6674+
styled-components@^2.2.3:
6675+
version "2.2.3"
6676+
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-2.2.3.tgz#154575c269880c840f903f580287dab155cf684c"
6677+
dependencies:
6678+
buffer "^5.0.3"
6679+
css-to-react-native "^2.0.3"
6680+
fbjs "^0.8.9"
6681+
hoist-non-react-statics "^1.2.0"
6682+
is-function "^1.0.1"
6683+
is-plain-object "^2.0.1"
6684+
prop-types "^15.5.4"
6685+
stylis "3.x"
6686+
supports-color "^3.2.3"
6687+
66466688
"styled-jsx-postcss@git+https://github.com/timsuchanek/styled-jsx-postcss#build3":
66476689
version "0.2.0"
66486690
resolved "git+https://github.com/timsuchanek/styled-jsx-postcss#677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
@@ -6654,6 +6696,18 @@ style-loader@^0.18.2:
66546696
postcss-load-plugins "^2.2.0"
66556697
styled-jsx "^0.5.7"
66566698

6699+
"styled-jsx-postcss@git+https://github.com/timsuchanek/styled-jsx-postcss.git#build3":
6700+
version "0.2.0"
6701+
uid "677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
6702+
resolved "git+https://github.com/timsuchanek/styled-jsx-postcss.git#677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
6703+
dependencies:
6704+
babel-traverse "^6.21.0"
6705+
babylon "^6.14.1"
6706+
deasync "^0.1.9"
6707+
postcss "^5.2.8"
6708+
postcss-load-plugins "^2.2.0"
6709+
styled-jsx "^0.5.7"
6710+
66576711
66586712
version "0.5.2"
66596713
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-0.5.2.tgz#59740216c3db371636f9beec02149f9da5ea02e5"
@@ -6679,6 +6733,10 @@ styled-jsx@^0.5.7:
66796733
source-map "0.5.6"
66806734
string-hash "1.1.1"
66816735

6736+
6737+
version "3.4.3"
6738+
resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.4.3.tgz#875bd0db3db37bb6de08f89275fc38ee2e32ee75"
6739+
66826740
subscriptions-transport-ws@^0.8.1:
66836741
version "0.8.2"
66846742
resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz#2325b3cff1bdcd824b60a8ba7135cdfeb6161091"

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.1.6",
3+
"version": "1.1.7-beta.1",
44
"main": "./lib/lib.js",
55
"typings": "./lib/lib.d.ts",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",

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

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -971,22 +971,21 @@ query ${operationName} {
971971
value: any,
972972
cb?: () => void,
973973
) {
974-
this.setState(
975-
state => {
976-
// TODO optimize the lookup with a lookup table
977-
const i = state.sessions.findIndex(s => s.id === sessionId)
978-
return {
979-
...state,
980-
sessions: Immutable.setIn(state.sessions, [i, key], value),
981-
changed: true,
982-
}
983-
},
984-
() => {
985-
if (typeof cb === 'function') {
986-
cb()
987-
}
988-
},
989-
)
974+
this.setState(state => {
975+
// TODO optimize the lookup with a lookup table
976+
const i = state.sessions.findIndex(s => s.id === sessionId)
977+
return {
978+
...state,
979+
sessions: Immutable.setIn(state.sessions, [i, key], value),
980+
changed: true,
981+
}
982+
})
983+
// hack to support older react versions
984+
setTimeout(() => {
985+
if (typeof cb === 'function') {
986+
cb()
987+
}
988+
}, 100)
990989
}
991990

992991
private autofillMutation = () => {
@@ -1273,7 +1272,7 @@ query ${operationName} {
12731272
private createSessionFromQuery = (query: string) => {
12741273
return Immutable({
12751274
id: cuid(),
1276-
selectedViewer: 'ADMIN',
1275+
selectedViewer: 'EVERYONE',
12771276
query,
12781277
variables: '',
12791278
result: '',

0 commit comments

Comments
 (0)