bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Add operationName if more than 1 operation is in the document

Open tho-graf opened this issue 1 year ago • 0 comments

I have checked the following:

  • [X] I use the newest version of bruno.
  • [X] I've searched existing issues and found nothing related to my issue.

Describe the bug

Hi there,

I tried Bruno for the first time and found a bug.

I know from other tools that I can have more than one operation in my document. When I do this with Bruno, I can't choose my operation to execute and Bruno doesn't add the operationName.

{
{
  "query": "query scenarios {\n  scenarios {\n    name\n  }\n}\n\nquery resources {\n  resources(first: 5) {\n    edges {\n      node {\n        displayName\n      }\n    }\n  }\n}\n",
  "variables": {}
}
}

Insomnia sends (which is correct) (at the ending the "operationName":"scenarios")

| {"query":"query scenaros {\n  scenarios {\n    name\n  }\n}\n\nquery resources {\n  resources(first: 5) {\n    edges {\n      node {\n        displayName\n      }\n    }\n  }\n}\n","operationName":"scenarios"}

This yields in an error - like it is defined in the specs

image

For me this sounds like a bug.

Cheers Thomas

.bru file to reproduce the bug

No response

Screenshots/Live demo link

see examples in the description

tho-graf avatar Sep 26 '24 11:09 tho-graf