Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit f93d93d

Browse files
Fork and publish playground packages (#13)
* Use forked playground Update the getCdnMarkup to reference the scoped (forked) version of graphql-playground(-react) * Update all deps to forked versions * Publish react * Release html + middlewares * Update versions of -playground-html and publish to current
1 parent 0c16908 commit f93d93d

File tree

37 files changed

+484
-406
lines changed

37 files changed

+484
-406
lines changed

packages/graphql-playground-electron/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "graphql-playground-electron",
2+
"name": "@apollographql/graphql-playground-electron",
33
"productName": "GraphQL Playground",
44
"homepage": "https://github.com/graphcool/graphql-playground",
55
"repository": "graphcool/graphql-playground",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)",
7-
"version": "1.8.10",
7+
"version": "1.8.11",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",
@@ -82,6 +82,8 @@
8282
"test-quick"
8383
],
8484
"dependencies": {
85+
"@apollographql/graphql-playground-html": "^1.6.17",
86+
"@apollographql/graphql-playground-react": "1.7.24",
8587
"@types/ms": "^0.7.30",
8688
"classnames": "^2.2.5",
8789
"date-fns": "^1.29.0",
@@ -96,8 +98,6 @@
9698
"graphql-config": "^2.1.0",
9799
"graphql-config-extension-graphcool": "1.0.8",
98100
"graphql-config-extension-prisma": "^0.2.5",
99-
"graphql-playground-html": "^1.6.0",
100-
"graphql-playground-react": "1.7.20",
101101
"immutable": "4.0.0-rc.9",
102102
"js-yaml": "^3.11.0",
103103
"lodash.merge": "^4.6.1",

packages/graphql-playground-electron/src/renderer/components/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import { remote, ipcRenderer, webFrame } from 'electron'
33
import * as cx from 'classnames'
4-
import { Playground as IPlayground } from 'graphql-playground-react/lib/components/Playground'
4+
import { Playground as IPlayground } from '@apollographql/graphql-playground-react/lib/components/Playground'
55
import { merge, set } from 'immutable'
66
import Playground, {
77
openSettingsTab,
@@ -17,7 +17,7 @@ import Playground, {
1717
getEndpoint,
1818
selectAppHistoryItem,
1919
AppHistoryItem,
20-
} from 'graphql-playground-react'
20+
} from '@apollographql/graphql-playground-react'
2121
import {
2222
getGraphQLConfig,
2323
findGraphQLConfigFile,

packages/graphql-playground-electron/src/renderer/components/InitialView/InitialView.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { connect } from 'react-redux'
99
import * as format from 'date-fns/format'
1010
import Toggle from './Toggle'
1111
import { examples } from './data'
12-
import { getAppHistory, AppHistoryItem } from 'graphql-playground-react'
12+
import {
13+
getAppHistory,
14+
AppHistoryItem,
15+
} from '@apollographql/@apollographql/graphql-playground-react'
1316
import { createStructuredSelector, createSelector } from 'reselect'
1417
import { OrderedMap } from 'immutable'
1518

@@ -294,7 +297,10 @@ class InitialView extends React.Component<Props & StateFromProps, State> {
294297
}
295298
}
296299

297-
const itemsSelector = createSelector([getAppHistory], state => state.items)
300+
const itemsSelector = createSelector(
301+
[getAppHistory],
302+
state => state.items,
303+
)
298304

299305
const mapStateToProps = createStructuredSelector({
300306
history: itemsSelector,

packages/graphql-playground-electron/src/renderer/components/Root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import App from './App'
3-
import { store } from 'graphql-playground-react'
3+
import { store } from '@apollographql/graphql-playground-react'
44
import { Provider } from 'react-redux'
55

66
export default class Root extends React.Component {

packages/graphql-playground-electron/src/renderer/redux/reducers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { combineReducers } from 'redux'
2-
import graphiqlDocs from 'graphql-playground-react/lib/reducers/graphiql-docs'
2+
import graphiqlDocs from '@apollographql/graphql-playground-react/lib/reducers/graphiql-docs'
33
import history from './history'
44

55
const combinedReducers = combineReducers({

packages/graphql-playground-electron/webpack.config.build.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const HappyPack = require('happypack')
77
const os = require('os')
88
const fs = require('fs')
99
const UglifyJSParallelPlugin = require('webpack-uglify-parallel')
10-
const { renderPlaygroundPage } = require('graphql-playground-html')
10+
const {
11+
renderPlaygroundPage,
12+
} = require('@apollo/@apollographql/graphql-playground-html')
1113

1214
const appEntrypoint = 'src/renderer/index.html'
1315

packages/graphql-playground-electron/webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const path = require('path')
66
const fs = require('fs')
77
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
88
const HappyPack = require('happypack')
9-
const { renderPlaygroundPage } = require('graphql-playground-html')
9+
const {
10+
renderPlaygroundPage,
11+
} = require('@apollographql/graphql-playground-html')
1012

1113
const appEntrypoint = 'src/renderer/index.html'
1214

packages/graphql-playground-electron/yarn.lock

Lines changed: 63 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,69 @@
1010
version "0.0.6"
1111
resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30"
1212

13+
"@apollographql/graphql-playground-html@^1.6.17":
14+
version "1.6.17"
15+
resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.17.tgz#26980e0441cfd32f870151696d51b61de9009423"
16+
integrity sha512-VC9BNRAk7O0W0Uat33JLjISiGfQvD4cpXzc5XSQCpzdAufi+X6ZrzbNLgVtJ9Aj30VVCXcLlT0pkcKC5vDVA0A==
17+
18+
"@apollographql/[email protected]":
19+
version "1.7.24"
20+
resolved "https://registry.yarnpkg.com/@apollographql/graphql-playground-react/-/graphql-playground-react-1.7.24.tgz#ceb9861cf4371da1f652a3a982db95680911a926"
21+
integrity sha512-j96L9QKiRhnBJCS15I3fwX9Ifhxk40Sj5DjPjps4rcj2cJLpqR2FPSsWII1ZafCszncxwam0HO4KFQvWKAbavQ==
22+
dependencies:
23+
"@types/lru-cache" "^4.1.1"
24+
apollo-link "^1.0.7"
25+
apollo-link-http "^1.3.2"
26+
apollo-link-ws "1.0.8"
27+
calculate-size "^1.1.1"
28+
codemirror "^5.38.0"
29+
codemirror-graphql timsuchanek/codemirror-graphql#details-fix
30+
copy-to-clipboard "^3.0.8"
31+
cryptiles "4.1.2"
32+
cuid "^1.3.8"
33+
graphiql "^0.11.2"
34+
graphql "^0.11.7"
35+
immutable "^4.0.0-rc.9"
36+
isomorphic-fetch "^2.2.1"
37+
js-yaml "^3.10.0"
38+
json-stable-stringify "^1.0.1"
39+
keycode "^2.1.9"
40+
lodash "^4.17.11"
41+
lodash.debounce "^4.0.8"
42+
markdown-it "^8.4.1"
43+
marked "^0.3.19"
44+
prettier "^1.13.0"
45+
prop-types "^15.6.0"
46+
query-string "5"
47+
react "^16.3.1"
48+
react-addons-shallow-compare "^15.6.2"
49+
react-codemirror "^1.0.0"
50+
react-copy-to-clipboard "^5.0.1"
51+
react-display-name "^0.2.3"
52+
react-dom "^16.3.1"
53+
react-helmet "^5.2.0"
54+
react-input-autosize "^2.2.1"
55+
react-modal "^3.1.11"
56+
react-redux "^5.0.6"
57+
react-router-dom "^4.2.2"
58+
react-sortable-hoc "^0.8.3"
59+
react-transition-group "^2.2.1"
60+
react-virtualized "^9.12.0"
61+
redux "^3.7.2"
62+
redux-actions "^2.2.1"
63+
redux-immutable "^4.0.0"
64+
redux-localstorage rc
65+
redux-localstorage-debounce "^0.1.0"
66+
redux-localstorage-filter "^0.1.1"
67+
redux-saga "^0.16.0"
68+
reselect "^3.0.1"
69+
seamless-immutable "^7.0.1"
70+
styled-components "^4.0.0"
71+
subscriptions-transport-ws "^0.9.5"
72+
utility-types "^1.0.0"
73+
webpack-bundle-analyzer "^2.9.2"
74+
zen-observable "^0.7.1"
75+
1376
"@babel/code-frame@^7.0.0-beta.35":
1477
version "7.0.0"
1578
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
@@ -3766,68 +3829,6 @@ graphql-language-service-utils@^1.2.2:
37663829
graphql-config "2.0.1"
37673830
graphql-language-service-types "^1.2.2"
37683831

3769-
graphql-playground-html@^1.6.0:
3770-
version "1.6.5"
3771-
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.6.5.tgz#0de1a68db891f7356312cf03dcf371d67388e95a"
3772-
3773-
3774-
version "1.7.20"
3775-
resolved "https://registry.yarnpkg.com/graphql-playground-react/-/graphql-playground-react-1.7.20.tgz#99f27fabbb9b24bb18cce2b62a5324567d7cdfb6"
3776-
integrity sha512-0l0z6/D4KhsleX4JKWM/1qiSa+g8s7nmUEn1pj52UmxzqRgDkEequbPEa3zMeeR+k1In89J1i7/YdhHuFNFICQ==
3777-
dependencies:
3778-
"@types/lru-cache" "^4.1.1"
3779-
apollo-link "^1.0.7"
3780-
apollo-link-http "^1.3.2"
3781-
apollo-link-ws "1.0.8"
3782-
calculate-size "^1.1.1"
3783-
codemirror "^5.38.0"
3784-
codemirror-graphql timsuchanek/codemirror-graphql#details-fix
3785-
copy-to-clipboard "^3.0.8"
3786-
cryptiles "4.1.2"
3787-
cuid "^1.3.8"
3788-
graphiql "^0.11.2"
3789-
graphql "^0.11.7"
3790-
immutable "^4.0.0-rc.9"
3791-
isomorphic-fetch "^2.2.1"
3792-
js-yaml "^3.10.0"
3793-
json-stable-stringify "^1.0.1"
3794-
keycode "^2.1.9"
3795-
lodash "^4.17.11"
3796-
lodash.debounce "^4.0.8"
3797-
markdown-it "^8.4.1"
3798-
marked "^0.3.19"
3799-
prettier "^1.13.0"
3800-
prop-types "^15.6.0"
3801-
query-string "5"
3802-
react "^16.3.1"
3803-
react-addons-shallow-compare "^15.6.2"
3804-
react-codemirror "^1.0.0"
3805-
react-copy-to-clipboard "^5.0.1"
3806-
react-display-name "^0.2.3"
3807-
react-dom "^16.3.1"
3808-
react-helmet "^5.2.0"
3809-
react-input-autosize "^2.2.1"
3810-
react-modal "^3.1.11"
3811-
react-redux "^5.0.6"
3812-
react-router-dom "^4.2.2"
3813-
react-sortable-hoc "^0.8.3"
3814-
react-transition-group "^2.2.1"
3815-
react-virtualized "^9.12.0"
3816-
redux "^3.7.2"
3817-
redux-actions "^2.2.1"
3818-
redux-immutable "^4.0.0"
3819-
redux-localstorage rc
3820-
redux-localstorage-debounce "^0.1.0"
3821-
redux-localstorage-filter "^0.1.1"
3822-
redux-saga "^0.16.0"
3823-
reselect "^3.0.1"
3824-
seamless-immutable "^7.0.1"
3825-
styled-components "^4.0.0"
3826-
subscriptions-transport-ws "^0.9.5"
3827-
utility-types "^1.0.0"
3828-
webpack-bundle-analyzer "^2.9.2"
3829-
zen-observable "^0.7.1"
3830-
38313832
graphql-request@^1.5.0:
38323833
version "1.8.2"
38333834
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.8.2.tgz#398d10ae15c585676741bde3fc01d5ca948f8fbe"

packages/graphql-playground-html/minimal.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta charset=utf-8/>
66
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
77
<title>GraphQL Playground</title>
8-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/css/index.css" />
9-
<link rel="shortcut icon" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/favicon.png" />
10-
<script src="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js"></script>
8+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react/build/static/css/index.css" />
9+
<link rel="shortcut icon" href="//cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react/build/favicon.png" />
10+
<script src="//cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react/build/static/js/middleware.js"></script>
1111
</head>
1212

1313
<body>
@@ -43,7 +43,7 @@
4343
font-weight: 400;
4444
}
4545
</style>
46-
<img src='//cdn.jsdelivr.net/npm/graphql-playground-react/build/logo.png' alt=''>
46+
<img src='//cdn.jsdelivr.net/npm/@apollographql/graphql-playground-react/build/logo.png' alt=''>
4747
<div class="loading"> Loading
4848
<span class="title">GraphQL Playground</span>
4949
</div>
Lines changed: 62 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,71 @@
11
<!DOCTYPE html>
22
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta
6+
name="viewport"
7+
content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui"
8+
/>
9+
<title>GraphQL Playground</title>
10+
<link
11+
rel="stylesheet"
12+
href="./node_modules/@apollographql/graphql-playground-react/build/static/css/index.css"
13+
/>
14+
<link
15+
rel="shortcut icon"
16+
href="./node_modules/@apollographql/graphql-playground-react/build/favicon.png"
17+
/>
18+
<script src="./node_modules/@apollographql/graphql-playground-react/build/static/js/middleware.js"></script>
19+
</head>
320

4-
<head>
5-
<meta charset=utf-8 />
6-
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
7-
<title>GraphQL Playground</title>
8-
<link rel="stylesheet" href="./node_modules/graphql-playground-react/build/static/css/index.css" />
9-
<link rel="shortcut icon" href="./node_modules/graphql-playground-react/build/favicon.png" />
10-
<script src="./node_modules/graphql-playground-react/build/static/js/middleware.js"></script>
11-
</head>
21+
<body>
22+
<div id="root">
23+
<style>
24+
body {
25+
background-color: rgb(23, 42, 58);
26+
font-family: Open Sans, sans-serif;
27+
height: 90vh;
28+
}
1229

13-
<body>
14-
<div id="root">
15-
<style>
16-
body {
17-
background-color: rgb(23, 42, 58);
18-
font-family: Open Sans, sans-serif;
19-
height: 90vh;
20-
}
30+
#root {
31+
height: 100%;
32+
width: 100%;
33+
display: flex;
34+
align-items: center;
35+
justify-content: center;
36+
}
2137

22-
#root {
23-
height: 100%;
24-
width: 100%;
25-
display: flex;
26-
align-items: center;
27-
justify-content: center;
28-
}
38+
.loading {
39+
font-size: 32px;
40+
font-weight: 200;
41+
color: rgba(255, 255, 255, 0.6);
42+
margin-left: 20px;
43+
}
2944

30-
.loading {
31-
font-size: 32px;
32-
font-weight: 200;
33-
color: rgba(255, 255, 255, .6);
34-
margin-left: 20px;
35-
}
45+
img {
46+
width: 78px;
47+
height: 78px;
48+
}
3649

37-
img {
38-
width: 78px;
39-
height: 78px;
40-
}
41-
42-
.title {
43-
font-weight: 400;
44-
}
45-
</style>
46-
<img src='./node_modules/graphql-playground-react/build/logo.png' alt=''>
47-
<div class="loading"> Loading
48-
<span class="title">GraphQL Playground</span>
50+
.title {
51+
font-weight: 400;
52+
}
53+
</style>
54+
<img
55+
src="./node_modules/@apollographql/graphql-playground-react/build/logo.png"
56+
alt=""
57+
/>
58+
<div class="loading">
59+
Loading
60+
<span class="title">GraphQL Playground</span>
61+
</div>
4962
</div>
50-
</div>
51-
<script>window.addEventListener('load', function (event) {
52-
GraphQLPlayground.init(document.getElementById('root'), {
53-
// options as 'endpoint' belong here
63+
<script>
64+
window.addEventListener('load', function(event) {
65+
GraphQLPlayground.init(document.getElementById('root'), {
66+
// options as 'endpoint' belong here
67+
})
5468
})
55-
})</script>
56-
</body>
57-
58-
</html>
69+
</script>
70+
</body>
71+
</html>

0 commit comments

Comments
 (0)