File tree Expand file tree Collapse file tree 3 files changed +14
-13
lines changed
packages/graphql-playground-react/src Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ function* runQuerySaga(action) {
137
137
headers,
138
138
credentials : settings [ 'request.credentials' ] ,
139
139
}
140
-
140
+
141
141
const { link, subscriptionClient } = linkCreator ( lol )
142
142
yield put ( setCurrentQueryStartTime ( new Date ( ) ) )
143
143
Original file line number Diff line number Diff line change @@ -191,8 +191,14 @@ function* addToHistory({ payload }) {
191
191
function * prettifyQuery ( ) {
192
192
const { query } = yield select ( getSelectedSession )
193
193
const settings = yield select ( getSettings )
194
- const prettyQuery = prettify ( query , settings [ 'prettier.printWidth' ] )
195
- yield put ( editQuery ( prettyQuery ) )
194
+ try {
195
+ const prettyQuery = prettify ( query , settings [ 'prettier.printWidth' ] )
196
+ yield put ( editQuery ( prettyQuery ) )
197
+ } catch ( e ) {
198
+ // TODO show erros somewhere
199
+ // tslint:disable-next-line
200
+ console . log ( e )
201
+ }
196
202
}
197
203
198
204
export const sessionsSagas = [
Original file line number Diff line number Diff line change @@ -13,14 +13,9 @@ export function safely(cb: any) {
13
13
}
14
14
15
15
export function prettify ( query : string , printWidth : number ) {
16
- try {
17
- return prettier . format ( query , {
18
- parser : 'graphql' ,
19
- printWidth,
20
- plugins : [ graphql ] ,
21
- } )
22
- } catch ( e ) {
23
- //TODO show erros somewhere
24
- console . log ( e )
25
- }
16
+ return prettier . format ( query , {
17
+ parser : 'graphql' ,
18
+ printWidth,
19
+ plugins : [ graphql ] ,
20
+ } )
26
21
}
You can’t perform that action at this time.
0 commit comments