@@ -6,9 +6,9 @@ import "codemirror/theme/twilight.css";
66import "codemirror/lib/codemirror.css" ;
77import "codemirror/addon/hint/show-hint" ;
88import "codemirror/addon/hint/show-hint.css" ;
9- import "codemirror-graphql/hint" ;
10- import "codemirror-graphql/lint" ;
11- import "codemirror-graphql/mode" ;
9+ // import "codemirror-graphql/hint";
10+ // import "codemirror-graphql/lint";
11+ // import "codemirror-graphql/mode";
1212import "codemirror/addon/lint/lint.css" ;
1313
1414const GraphQLBodyEntryForm = ( props ) => {
@@ -25,19 +25,14 @@ const GraphQLBodyEntryForm = (props) => {
2525
2626 // set a new value for codemirror only if loading from history or changing query type
2727 useEffect ( ( ) => {
28- if ( ! bodyIsNew ) setValue ( bodyContent )
29- } , [ bodyContent ] )
30-
31-
28+ if ( ! bodyIsNew ) setValue ( bodyContent ) ;
29+ } , [ bodyContent ] ) ;
3230
3331 return (
3432 < div className = "mt-3" >
35- { // conditionally render warning message
36- warningMessage ?
37- < div >
38- { warningMessage . body }
39- </ div >
40- : null
33+ {
34+ // conditionally render warning message
35+ warningMessage ? < div > { warningMessage . body } </ div > : null
4136 }
4237 < div className = "composer-section-title" > Body</ div >
4338 < div id = "gql-body-entry" className = "is-neutral-200-box p-3" >
@@ -55,12 +50,14 @@ const GraphQLBodyEntryForm = (props) => {
5550 indentUnit : 2 ,
5651 tabSize : 2 ,
5752 } }
58- editorDidMount = { editor => { editor . setSize ( '100%' , 150 ) } }
53+ editorDidMount = { ( editor ) => {
54+ editor . setSize ( "100%" , 150 ) ;
55+ } }
5956 onBeforeChange = { ( editor , data , value ) => {
6057 const optionObj = {
6158 schema : introspectionData . clientSchema ,
6259 completeSingle : false ,
63- }
60+ } ;
6461 setValue ( value ) ;
6562 editor . setOption ( "lint" , optionObj ) ;
6663 editor . setOption ( "hintOptions" , optionObj ) ;
0 commit comments