New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphql error - Unknown operation named \"Operations\" #5752
Comments
This feels like a problem with your resource and not Insomnia, try using the StarWars API (free) https://studio.apollographql.com/public/star-wars-swapi/home?variant=current and hitting the example query. That will confirm whether its Insomnia, or the book.api |
I just ran into this issue too and the StarWars API didn't work at first either. Using the StarWars API it was clearly able to pull in the schema, but when posting to the endpoint it gave a 500 and a similar response to @diogoX451. This was even worse than my localhost api, which was giving the weird I was eventually able to get the StarWars API to work after playing around with the query name, deleting a needing close parens, then adding the close parens back. After this is mysteriously worked. I was think able to get my local one to work after some similar finagling. Now, if I have a trivial query like |
Hi @diogoX451 and @scottBowles - it might be the case that when you first bumped into this issue you were using one of Insomnia's recent versions that had the I would recommend in this case that you upgrade to the latest Insomnia version, perhaps the beta release, try recreate a new graphql request and see if you can still reproduce the problem. |
Having the same issue as @diogoX451 |
I used postman, and all queries work perfectly, I thought it was something related to my request, but apparently not |
Same, with Postman, worked. Even the Documentation fetch is better in Insomnia. |
Similar error, but slightly different error message: It happens when I'm trying to execute an unnamed query against the GitHub GraphQL API: {"query":"{viewer{login}}","operationName":""} The problem is the empty
|
This "Operations" function that is disturbing the question of making the request, I see the advantage of insomnia that brings the documentation of the queries and mutations... But if it continues like this, I can't advance in the queries. |
I just ran into this. Upgrading to Insomnia 2023.1.0-beta.1 did not help. It may have been caused by "Copy as cURL", the query worked fine before I did that. Notably, the operation name in the copied curl was truncated; I had Hopefully that info is helpful in some way. I did fix things by manually recreating the query, then everything worked. And in beta1, when I copy as curl the operation is no longer truncated. |
+1 We had this same issue. Upgraded from Apollo 2->3 is when it started to occur. |
@mislav 👋 nice to see you around here! I've also been running into a similar problem lately. Does clicking on |
@colinshum 👋 Selecting the empty row item does work; good find! My workaround was to always ensure that an operation is named in my query, but when executing named operations, I sometimes run into the same issue that was also reported in this thread: that Insomnia sends an incomplete or outdated operation name to the server. For instance, I might rename my operation to |
We hit this too. Insomnia is removing characters from the extracted
Looking in the Timeline on Insomnia, you can see the
|
We've confirmed that this bug does not exist in version 2022.6.0 |
Clicking here before "Send" resolves the issue... To me, this indicates it's a UI issue. Meaning, when you're typing, the Interestingly, the complete |
Yes, that works Hard to imagine how they've left this broken, as of 2022.7.5, still the download. Thank you, @philwhln |
Similar issue with me when adding the query name, it was cutting off the last letter - selecting this drop down and clicking the name seemed to help get around the issue |
I got the same error when I copy pasted the JSON directly from VSCode into Insomnia. I did not include I got a workaround by prepending |
Every named query I run does this. If you copy the request as cURL you can see that the You can see it reflected in the UI too: Downgrading to 2022.7.2 works, if you update the name of the query to cause it to update the |
This update that forces using Operations is very bad. I really like insomnia, but that way I will have to turn to other software. |
Sorry, the following is wrong, as marked: see next message. I hadn't checked far enough. NO: Interestingly, on 2022.7.5, up-to-date Windows 10, I'm not seeming to see this problem. A named query works; if I alter the name, it alters in that UX visual also, and I don't have to touch it for things to work. What may be different is that I'm using the no-install 'portable' version of Insomnia, though it's on the SSD of the laptop -- have any of you tried this? YES Really, though, this bug seriously needs to get fixed. There was another I ran into recently; can't remember, but it feels like development is getting looser, and Insomnia deserves better, no? |
Well, spoke too soon. The bug is indeed there. Underlining the last statement. I'll leave the above and apologize here, for anyone following just by email. |
I got the same error today after updating Insomnia to the latest version! |
I don't seem to recall having this issue until the last few months. Can't say I noticed the operations selector before either. In my case I think it is because I often duplicate an existing request, then edit it and Insomnia does not update (or remove if no named operations) the operation name. Selecting the operation from the dropdown does remove the operation name from the request, but does not clear the operations drop-down. Is Insomnia losing support? It would be a great shame as I prefer it a great deal over Postman or any other solution. |
I just encountered the same error today. Kind of a weird error and Insomnia is not the first thing I looked for i'll admit when I got it. I wonder if anyone at Insomnia has seen this? |
I does not "solve" the issue - it is a way to avoid it until it is solved. Turning off features to enable other features to work is not a solution. |
You're right. But for now it allows to make request and overcome the error. |
This is happening for me as well in:
|
@filfreire you seem to have a lot of contributions this year. Can you relay this to the person that can resolve this? This bug is open for almost half a year now. Thanks 🙏 |
I don't really understand why this Operations feature was added. What does it solve? Seems to me it mostly confuses users and causes bugs. Typically I use insomnia configurations generated by automation tools so the Operations are split into separate requests and the Operations selector is never set so nothing works. |
This only seems to happen if you switch between named and unnamed queries with "Automatic Fetch" enabled. The easiest workaround is to exclusively use named or unnamed queries. The other option is to select the empty operation name or setting a bogus name for the query and selecting the same from the operations tab 🤷. |
I can confirm that the issue is still there, version 2023.5.7
|
Working for me as well today. Wow, yesterday it was still not working! |
I faced the issue after doing this steps:
Version: Insomnia 2023.2.0 |
Having the same issue on MacOS Version: Insomnia 8.3.0 |
As of this moment it's still not fixed for me with the latest update: Version: Insomnia 8.4.2 As a workaround, giving names to my mutations at least allows me to keep working. |
It seems like the issue is still here with Insomnia v8.4.2 on MacOS ( node 18.14.2 ) |
Still having the same issue with Insomnia 8.4.5 on Ubuntu. |
still not fixed 8.4.5 macOS apple silicon |
A workaround that seems to consistently work for me:
This page in the Insomnia docs gave me the idea with: |
@cwalworth Cameron, that's a really good idea, and thanks for showing h ow you worked it out. I find this whole situation hard to imagine, if these Kong people are serious. They've taken forever to make an fix, and then somehow it seems people aren't getting it. Along with too-'clever' hacker-looking identities and 'chinese' code traps. Here's what I did, considering that originally this was good work, by decent persons.
Then I was met with one more set of requirements. I'd really suggest there needs to be some rethinking at Kong, and hope they do it. |
@narration-sd I completely agree, which is why I've been using Insomnium:
Unfortunately this bug came with the fork, but at least I don't have to sign in! |
Addendum to the last comment, so it will be highly visible. You do NOT have to sign up for an Insomnia account to use this latest version. There is a tiny button at lower left on the big sign-in box, labeled with ScratchPad. Otherwise, you will run into one of the most arcane and dangerous-looking sign-up pages I think I've seen. You'll be asked for some unrecognizable 'passphrase' business as well. With all kinds of caveats against their liability. Once I realized about the tiny button, I completely deleted this account. It is also not helping their case to have developers presenting a hacker appearance, what childishness, complete with 'Chinese' puzzle code. Nor to have the months and months of delay fixing this current problem, if it is fixed. The code change looks like it might do this. Insomnia has been a very good tool, put togeher by well-meaning persons. I think an adult will have to look at their current presentation, if they hope it will lead to subscriptions as a business. That's the best thought I can offer. |
@cwalworth Just got your reply, thanks for that. And you'll see I put a few more things for the case... I'll have a look at Insomnium, and maybe the fix here could be ported, as it's pretty small. Take care, and hope you're enjoying nice holidays 🌲 |
Running into this as well:
cwalworth's workaround worked for me thank you |
Why in the world was this terrible straight-up bug closed? We have several people hitting this constantly. On v2023.5.8 and still happening. |
Looks like they think they fixed it, back in October last year: #6733 I wonder about communications -- perhaps you might raise a fresh bug and link to here, as they're probably not seeing any comments since closing it. I don't have much need these days, but when I do, I'm trying out the fork Insomnium, brought to attention here: #5752 (comment) |
Just ran into this as well...the kind suggestion of switching to json then deleting the operation worked nicely for me though, thank you |
Expected Behavior
I passed the url and method I wanted to make the request, he asks that he needs the "operations" method
{ "errors": [ { "message": "Unknown operation named \"Operations\".", "extensions": { "category": "graphql" } } ] }
Actual Behavior
When I make a request it does not return the content that should be returned
Reproduction Steps
No response
Is there an existing issue for this?
Additional Information
This problem happened in the new update that happened, at the moment everything was normal
Insomnia Version
2022.7.5
What operating system are you using?
Ubuntu
Operating System Version
Ubunut 22.04.1
Installation method
apt-get
Last Known Working Insomnia version
2022.7.4
The text was updated successfully, but these errors were encountered: