Skip to content

Commit a5a5970

Browse files
committed
performance fixes
1 parent c17a8d2 commit a5a5970

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
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": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)",
7-
"version": "1.4.4",
7+
"version": "1.4.5",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",
@@ -96,7 +96,7 @@
9696
"graphql-config": "^2.0.1",
9797
"graphql-config-extension-graphcool": "1.0.8",
9898
"graphql-config-extension-prisma": "0.0.9",
99-
"graphql-playground-react": "1.4.6",
99+
"graphql-playground-react": "1.4.7",
100100
"js-yaml": "^3.10.0",
101101
"lodash.merge": "^4.6.0",
102102
"minimist": "^1.2.0",

packages/graphql-playground-electron/yarn.lock

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,9 +3619,9 @@ [email protected]:
36193619
dependencies:
36203620
graphql-config "1.1.7"
36213621

3622-
3623-
version "1.4.6"
3624-
resolved "https://registry.yarnpkg.com/graphql-playground-react/-/graphql-playground-react-1.4.6.tgz#6693f58ce5bf33ad7740554e93a78629334c81ad"
3622+
3623+
version "1.4.7"
3624+
resolved "https://registry.yarnpkg.com/graphql-playground-react/-/graphql-playground-react-1.4.7.tgz#69a503230b70f6b14c114005107df05310027168"
36253625
dependencies:
36263626
apollo-link "^1.0.7"
36273627
apollo-link-http "^1.3.2"
@@ -7405,6 +7405,18 @@ styled-components@^3.0.1:
74057405
postcss-load-plugins "^2.2.0"
74067406
styled-jsx "^0.5.7"
74077407

7408+
"styled-jsx-postcss@git+https://github.com/timsuchanek/styled-jsx-postcss.git#build3":
7409+
version "0.2.0"
7410+
uid "677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
7411+
resolved "git+https://github.com/timsuchanek/styled-jsx-postcss.git#677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
7412+
dependencies:
7413+
babel-traverse "^6.21.0"
7414+
babylon "^6.14.1"
7415+
deasync "^0.1.9"
7416+
postcss "^5.2.8"
7417+
postcss-load-plugins "^2.2.0"
7418+
styled-jsx "^0.5.7"
7419+
74087420
[email protected], styled-jsx@^2.2.1:
74097421
version "2.2.1"
74107422
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-2.2.1.tgz#8b38b9e53e5d9767e392595ab1afdc8426b3ba5d"

packages/graphql-playground-react/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-react",
3-
"version": "1.4.6",
3+
"version": "1.4.7",
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-react/src/components/MiddlewareApp.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export default class MiddlewareApp extends React.Component<Props, State> {
111111
subscriptionEndpoint =
112112
this.normalizeSubscriptionUrl(endpoint, subscriptionEndpoint) || undefined
113113

114+
this.removeLoader()
115+
114116
this.state = {
115117
endpoint: this.absolutizeUrl(endpoint),
116118
subscriptionEndpoint,
@@ -124,6 +126,13 @@ export default class MiddlewareApp extends React.Component<Props, State> {
124126
}
125127
}
126128

129+
removeLoader() {
130+
const loadingWrapper = document.getElementById('loading-wrapper')
131+
if (loadingWrapper) {
132+
loadingWrapper.remove()
133+
}
134+
}
135+
127136
getGraphcoolSubscriptionEndpoint(endpoint) {
128137
if (endpoint.includes('api.graph.cool')) {
129138
return `wss://subscriptions.graph.cool/v1/${

packages/graphql-playground-react/src/components/Playground/TopBar/ReloadIcon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ const Circle = withProps<Props>()(styled.circle)`
9393
transition: opacity 0.3s ease-in-out;
9494
opacity: ${p => (p.isReloadingSchema ? 1 : 0)};
9595
transform-origin: 9.5px 10px;
96-
animation: ${refreshFrames} 2s linear infinite;
96+
animation: ${refreshFrames} 2s linear ${p =>
97+
p.isReloadingSchema ? 'infinite' : ''};
9798
`
9899

99100
const Icon = withProps<Props>()(styled.path)`

0 commit comments

Comments
 (0)