OneGraph / graphiql-explorer

Explorer plugin for GraphiQL
MIT License
904 stars 97 forks source link

Query variables are not loaded from URL #87

Open 0xJem opened 2 years ago

0xJem commented 2 years ago

If I have set variables for a query and then press "Copy Link", the variables are in the generated URL.

However, those variables are not loaded in the explorer interface. Nor are they present, as a query with required (but unset variables) does not run.

Sample query: https://api.thegraph.com/subgraphs/id/QmWrvfZh9qXPV5oJWapWZsgnPDEQAys2sGL1DBkkV7FEnt/graphql?query=%0A++++query+TokenRecords%28%24recordCount%3A+Int%21%2C+%24startingRecord%3A+Int+%3D+0%2C+%24filter%3A+TokenRecord_filter%29+%7B%0A++tokenRecords%28%0A++++first%3A+%24recordCount%0A++++skip%3A+%24startingRecord%0A++++where%3A+%24filter%0A++++orderBy%3A+date%0A++++orderDirection%3A+desc%0A++%29+%7B%0A++++id%0A++++balance%0A++++block%0A++++category%0A++++date%0A++++isBluechip%0A++++isLiquid%0A++++multiplier%0A++++rate%0A++++source%0A++++sourceAddress%0A++++timestamp%0A++++token%0A++++tokenAddress%0A++++value%0A++++valueExcludingOhm%0A++%7D%0A%7D%0A++++&variables=%22%7B%5Cn++%5C%22recordCount%5C%22%3A+1000%2C%5Cn++%5C%22filter%5C%22%3A+%7B%5Cn++++%5C%22isLiquid%5C%22%3A+true%2C%5Cn++++%5C%22date_gte%5C%22%3A+%5C%222022-08-10%5C%22%5Cn++%7D%5Cn%7D%22&operationName=TokenRecords

Open the URL in an incognito window, as the caching/local storage of queries will interfere with this.