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() {
2222 const [ variables , setVariables ] = useState ( "" )
2323 const editorQueryId = React . useRef ( 0 )
2424
25- async function runQuery ( options : { manual : boolean } ) {
25+ async function runQuery (
26+ options : { manual : boolean } ,
27+ source : string = query ,
28+ ) {
2629 editorQueryId . current ++
2730 const queryID = editorQueryId . current
2831 try {
2932 const result = await graphql ( {
3033 schema,
31- source : query ,
34+ source,
3235 variableValues : JSON . parse ( variables || "{}" ) ,
3336 } )
3437
@@ -66,7 +69,7 @@ export default function InteractiveEditor() {
6669 schema = { schema }
6770 onEdit = { newQuery => {
6871 setQuery ( newQuery )
69- runQuery ( { manual : false } )
72+ runQuery ( { manual : false } , newQuery )
7073 } }
7174 runQuery = { ( ) => {
7275 setVariableTypes ( getVariableToType ( schema , query ) )
@@ -110,7 +113,7 @@ export default function InteractiveEditor() {
110113 />
111114 < HowItWorksListItem
112115 text = "Get predictable results"
113- code = { < ResultViewer value = { results } /> }
116+ code = { < ResultViewer value = { results } vainlyExtractData /> }
114117 />
115118 </ >
116119 )
You can’t perform that action at this time.
0 commit comments