Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2bb34bb

Browse files
committed
fix: upgrades, schema viewer display & width adjustment
1 parent 9f83ef1 commit 2bb34bb

File tree

16 files changed

+170
-128
lines changed

16 files changed

+170
-128
lines changed

‎packages/graphql-playground-electron/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"find-up": "^2.1.0",
9393
"graphcool-styles": "0.2.7",
9494
"graphcool-ui": "^0.0.14",
95-
"graphql": "^15.0.0",
95+
"graphql": "^0.13.2",
9696
"graphql-config": "^2.2.2",
9797
"graphql-config-extension-graphcool": "^1.0.11",
9898
"graphql-config-extension-prisma": "^0.3.0",

‎packages/graphql-playground-react/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
"typescript": "3.8.3",
104104
"typescript-styled-plugin": "^0.11.0",
105105
"url-loader": "4.0.0",
106-
"webpack": "4.42.1",
107-
"webpack-dev-server": "3.10.3",
106+
"webpack": "4.44.1",
107+
"webpack-dev-server": "3.11.0",
108108
"webpack-manifest-plugin": "2.2.0",
109109
"why-did-you-update": "0.1.1"
110110
},
@@ -120,7 +120,7 @@
120120
"cryptiles": "4.1.2",
121121
"cuid": "^1.3.8",
122122
"graphiql": "^0.17.5",
123-
"graphql": "^15.0.0",
123+
"graphql": "^15.3.0",
124124
"immutable": "^4.0.0-rc.9",
125125
"isomorphic-fetch": "^2.2.1",
126126
"js-yaml": "^3.10.0",

‎packages/graphql-playground-react/src/components/GraphQLBinApp.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class GraphQLBinApp extends React.Component<Props & ReduxProps, State> {
5353
}
5454
}
5555

56-
componentWillMount() {
56+
UNSAFE_componentWillMount() {
5757
if (this.props.match.params.id) {
5858
if (this.props.match.params.id === 'new') {
5959
return

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class Playground extends React.PureComponent<Props & ReduxProps, State> {
196196
setSubscriptionEndpoint(props.subscriptionEndpoint)
197197
}
198198

199-
componentWillMount() {
199+
UNSAFE_componentWillMount() {
200200
// init redux
201201
this.props.initState(getWorkspaceId(this.props), this.props.endpoint)
202202
this.props.setConfigString(this.props.configString)
@@ -212,7 +212,7 @@ export class Playground extends React.PureComponent<Props & ReduxProps, State> {
212212
this.mounted = true
213213
}
214214

215-
componentWillReceiveProps(nextProps: Props & ReduxProps) {
215+
UNSAFE_componentWillReceiveProps(nextProps: Props & ReduxProps) {
216216
if (this.props.createApolloLink !== nextProps.createApolloLink) {
217217
setLinkCreator(nextProps.createApolloLink)
218218
}

‎packages/graphql-playground-react/src/components/Playground/DocExplorer/GraphDocs.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class GraphDocs extends React.Component<
6565
;(window as any).d = this
6666
}
6767

68-
componentWillReceiveProps(nextProps: SideTabContentProps & StateFromProps) {
68+
UNSAFE_componentWillReceiveProps(nextProps: SideTabContentProps & StateFromProps) {
6969
// If user use default column size % columnWidth
7070
// Make the column follow the clicks
7171
if (

‎packages/graphql-playground-react/src/components/Playground/ExplorerTabs/SideTabs.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
toggleDocs,
99
changeKeyMove,
1010
setDocsVisible,
11+
changeWidthDocs
1112
} from '../../../state/docs/actions'
1213
import { GraphQLSchema } from 'graphql'
1314
import { getSessionDocs } from '../../../state/docs/selectors'
@@ -252,6 +253,7 @@ const mapDispatchToProps = dispatch =>
252253
toggleDocs,
253254
changeKeyMove,
254255
setDocsVisible,
256+
changeWidthDocs
255257
},
256258
dispatch,
257259
)
@@ -269,6 +271,7 @@ const ConnectedGraphDocs = connect<StateFromProps, DispatchFromProps, Props>(
269271
{ forwardRef: true },
270272
)(SideTabs)
271273

274+
// @ts-ignore
272275
ConnectedGraphDocs.Tab = SideTab
273276

274277
export default ConnectedGraphDocs

‎packages/graphql-playground-react/src/components/Playground/GraphQLEditor.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,11 @@ class GraphQLEditor extends React.PureComponent<Props & ReduxProps> {
270270
</EditorBar>
271271
</EditorWrapper>
272272
<SideTabs
273+
sessionId={this.props.sessionId}
274+
schema={this.props.schema}
273275
setActiveContentRef={this.setSideTabActiveContentRef}
274276
setWidth={this.setDocsWidth}
277+
maxWidth={10000}
275278
>
276279
<SideTab label="Docs" activeColor="green" tabWidth="49px">
277280
<GraphDocs
@@ -284,6 +287,7 @@ class GraphQLEditor extends React.PureComponent<Props & ReduxProps> {
284287
schema={this.props.schema}
285288
ref={this.setSchemaExplorerRef}
286289
sessionId={this.props.sessionId}
290+
setWidth={this.setDocsWidth}
287291
/>
288292
</SideTab>
289293
</SideTabs>

‎packages/graphql-playground-react/src/components/Playground/QueryEditor.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class QueryEditor extends React.PureComponent<Props & ReduxProps, {}> {
207207
})
208208
}
209209

210-
componentWillReceiveProps(nextProps) {
210+
UNSAFE_componentWillReceiveProps(nextProps) {
211211
if (this.props.sessionId !== nextProps.sessionId) {
212212
this.closeCompletion()
213213
this.updateSessionScrollTop()

‎packages/graphql-playground-react/src/components/Playground/SchemaExplorer/SDLEditor.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,17 @@ class SDLEditor extends React.PureComponent<Props, { overflowY: boolean }> {
9898
}
9999
}
100100

101-
componentWillReceiveProps(nextProps) {
101+
UNSAFE_componentWillReceiveProps(nextProps) {
102102
if (this.props.sessionId !== nextProps.sessionId) {
103103
this.editor.scrollTo(0, 0)
104104
}
105105
}
106106

107107
componentWillUnmount() {
108-
this.editor.off('scroll')
109-
this.editor = null
108+
if(this.editor) {
109+
this.editor.off('scroll')
110+
this.editor = null
111+
}
110112
}
111113

112114
handleScroll = e => {

‎packages/graphql-playground-react/src/components/Playground/SchemaExplorer/SDLHeader.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default class SDLHeader extends React.Component<SDLHeaderProps, State> {
2222
}
2323
}
2424

25-
componentWillMount() {
25+
UNSAFE_componentWillMount() {
2626
document.addEventListener('mousedown', this.handleClick, false)
2727
}
2828

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /