Unknown operation GraphQL error, when you alter a query name
- Have a named query, introduced as shown, which will work fine if it's otherwise good (even on a hello-world for your GraphQL:
query SomeName {
- Now change it a little, leaving the cursor where it ends up after typing:
query SomeNamex {
Mouse Send, and you'll get an odd error, looking like it's GraphQL's:
{
"errors": [
{
"message": "Unknown operation named \"SomeName\".",
"category": "graphql"
}
]
}
- But. now click to move the cursor somewhere else, like in your query, or in the query args Send again. Then your query works.
Insomnia versions: 7.0, also the one before that, where I first saw it Platform: Windows 10, very latest, updates to moment.
👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. If you're requesting a feature 🎁, please provide real use cases that would benefit. 👪
To help make this a smooth process, please be sure you have first read the contributing guidelines.
confirmed fix on 7.0.1
We just encountered an issue exactly like this in version 2022.7.4, except with a query that omitted the operation name.
Also just found my way here after running into this issue with an unnamed query operation, though I'm on version 2022.7.2
Confirmed that adding a name to query was the only thing that seemed to make it work.

Also on 2022.7.4, running into this intermittently, on queries with and without operation names.
Sometimes can be solved by adding or tweaking an operation name, sometimes not.
Same here. Updated to 2022.7.5 and running into the same issue. Can't think of a stable way to reproduce tho: sometimes it just fails for me in one request tab, but continues to work for another, without any changes in any of the tabs.
Same for me today with 2022.7.5. @anandaroop's solution worked, but in my case, the queries were already named, so, I deleted the name from query myQuery { and added it back.