File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/graphql-playground-react/src/components/Playground/TopBar Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
22
22
import { share } from '../../../state/sharing/actions'
23
23
import { openHistory } from '../../../state/general/actions'
24
24
import { getSettings } from '../../../state/workspace/reducers'
25
+ import { Session } from '../../../state/sessions/reducers'
25
26
import { ISettings } from '../../../types'
26
27
27
28
export interface Props {
@@ -30,6 +31,7 @@ export interface Props {
30
31
fixedEndpoint ?: boolean
31
32
isPollingSchema : boolean
32
33
endpointUnreachable : boolean
34
+ session : Session
33
35
34
36
editEndpoint : ( value : string ) => void
35
37
prettifyQuery : ( ) => void
@@ -111,8 +113,7 @@ class TopBar extends React.Component<Props, {}> {
111
113
this . props . openHistory ( )
112
114
}
113
115
getCurl = ( ) => {
114
- // no need to rerender the whole time. only on-demand the store is fetched
115
- const session = getSelectedSession ( this . context . store . getState ( ) )
116
+ const session = this . props . session
116
117
let variables
117
118
try {
118
119
variables = JSON . parse ( session . variables )
@@ -157,6 +158,7 @@ const mapStateToProps = createStructuredSelector({
157
158
isPollingSchema : getIsPollingSchema ,
158
159
endpointUnreachable : getEndpointUnreachable ,
159
160
settings : getSettings ,
161
+ session : getSelectedSession ,
160
162
} )
161
163
162
164
export default connect (
You can’t perform that action at this time.
0 commit comments