File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/components/index-page/how-it-works Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,16 @@ export default function InteractiveEditor() {
22
22
const [ variables , setVariables ] = useState ( "" )
23
23
const editorQueryId = React . useRef ( 0 )
24
24
25
- async function runQuery ( options : { manual : boolean } ) {
25
+ async function runQuery (
26
+ options : { manual : boolean } ,
27
+ source : string = query ,
28
+ ) {
26
29
editorQueryId . current ++
27
30
const queryID = editorQueryId . current
28
31
try {
29
32
const result = await graphql ( {
30
33
schema,
31
- source : query ,
34
+ source,
32
35
variableValues : JSON . parse ( variables || "{}" ) ,
33
36
} )
34
37
@@ -66,7 +69,7 @@ export default function InteractiveEditor() {
66
69
schema = { schema }
67
70
onEdit = { newQuery => {
68
71
setQuery ( newQuery )
69
- runQuery ( { manual : false } )
72
+ runQuery ( { manual : false } , newQuery )
70
73
} }
71
74
runQuery = { ( ) => {
72
75
setVariableTypes ( getVariableToType ( schema , query ) )
@@ -110,7 +113,7 @@ export default function InteractiveEditor() {
110
113
/>
111
114
< HowItWorksListItem
112
115
text = "Get predictable results"
113
- code = { < ResultViewer value = { results } /> }
116
+ code = { < ResultViewer value = { results } vainlyExtractData /> }
114
117
/>
115
118
</ >
116
119
)
You can’t perform that action at this time.
0 commit comments