Skip to content

Commit 8fbc019

Browse files
committed
v1.1.3
1 parent 6f86e03 commit 8fbc019

File tree

14 files changed

+220
-92
lines changed

14 files changed

+220
-92
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
],
55
"homepage": "https://github.com/graphcool/graphql-playground",
66
"devDependencies": {
7+
"@types/node": "^8.0.52",
78
"aws-lambda": "^0.1.2",
89
"express": "^4.16.2",
910
"hapi": "^16.6.2",

packages/graphql-playground-middleware-express/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-middleware-express",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-express",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [

packages/graphql-playground-middleware-hapi/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-middleware-hapi",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-hapi",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [

packages/graphql-playground-middleware-koa/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-middleware-koa",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-koa",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [

packages/graphql-playground-middleware-lambda/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-middleware-lambda",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-lambada",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [

packages/graphql-playground-middleware/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-middleware",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [

packages/graphql-playground/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ example/yarn.lock
1010

1111
# production
1212
/build
13+
/dist
1314

1415
# misc
1516
.DS_Store

packages/graphql-playground/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"main": "./lib/lib.js",
55
"typings": "./lib/lib.d.ts",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
@@ -17,9 +17,9 @@
1717
"start": "node scripts/start.js",
1818
"prepublishOnly": "yarn build",
1919
"copy-styles": "cat src/styles/*.css > playground.css",
20-
"build": "rimraf lib && yarn build-app && yarn build-package && yarn copy-styles",
20+
"build": "rimraf dist build dist && yarn build-app && yarn build-package && yarn copy-styles",
2121
"tsc": "tsc -p tsconfig.build.json",
22-
"build-package": "rimraf lib && npm run tsc && babel lib -d lib && cp -r ./src/assets/ ./lib/assets/ && cd lib && rimraf *.jsx;",
22+
"build-package": "rimraf lib build/dist && npm run tsc && babel lib -d lib && cp -r ./src/assets/ ./lib/assets/ && cd lib && rimraf *.jsx;",
2323
"build-app": "node scripts/build.js",
2424
"test": "node scripts/test.js --env=jsdom",
2525
"bump": "npm version patch --no-git-tag-version && git add package.json",
@@ -94,7 +94,7 @@
9494
"tslint": "^5.5.0",
9595
"tslint-graphcool-frontend": "^0.0.3",
9696
"tslint-loader": "^3.5.3",
97-
"typescript": "2.3.4",
97+
"typescript": "^2.6.1",
9898
"url-loader": "0.5.7",
9999
"webpack": "^3.8.1",
100100
"webpack-dev-server": "^2.9.3",

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

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react'
2+
import * as fetch from 'isomorphic-fetch'
23
import { Provider } from 'react-redux'
34
import createStore from '../createStore'
45
import Playground from './Playground'
@@ -105,25 +106,27 @@ class App extends React.Component<Props, State> {
105106
.justifyCenter;
106107
}
107108
`}</style>
108-
{this.state.loading
109-
? <Loading />
110-
: !this.state.endpoint || this.state.endpoint.length === 0
111-
? <EndpointPopup
112-
onRequestClose={this.handleChangeEndpoint}
113-
endpoint={
114-
this.state.endpoint ||
115-
localStorage.getItem('last-endpoint') ||
116-
''
117-
}
118-
/>
119-
: <Playground
120-
endpoint={endpoint}
121-
subscriptionsEndpoint={subscriptionEndpoint}
122-
onChangeEndpoint={this.handleChangeEndpoint}
123-
share={this.share}
124-
shareUrl={this.state.shareUrl}
125-
session={this.state.session}
126-
/>}
109+
{this.state.loading ? (
110+
<Loading />
111+
) : !this.state.endpoint || this.state.endpoint.length === 0 ? (
112+
<EndpointPopup
113+
onRequestClose={this.handleChangeEndpoint}
114+
endpoint={
115+
this.state.endpoint ||
116+
localStorage.getItem('last-endpoint') ||
117+
''
118+
}
119+
/>
120+
) : (
121+
<Playground
122+
endpoint={endpoint}
123+
subscriptionsEndpoint={subscriptionEndpoint}
124+
onChangeEndpoint={this.handleChangeEndpoint}
125+
share={this.share}
126+
shareUrl={this.state.shareUrl}
127+
session={this.state.session}
128+
/>
129+
)}
127130
</div>
128131
</Provider>
129132
)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react'
2+
import * as fetch from 'isomorphic-fetch'
23
import Popup from './Popup'
34
import { throttle } from 'lodash'
45
import * as cn from 'classnames'

0 commit comments

Comments
 (0)