Skip to content

bruno-cli - graphql requests - Parse error on JSON when using a environment variable in a non string field #6076

@r321st

Description

@r321st

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying
  • this feature was working in a previous version but is broken in the current release.

Bruno version

2.14.1

Operating System

Windows 11 26100.6899

Describe the bug

Steps to reproduce:

  • create a graphql request as specified in the attached file
  • run your request through bruno-cli
  • bruno is sending the request with the numeric and structured variables replaced by their current value
  • run your collection using the command line : bru run . --insecure --env MyAPIEnv

Observed behaviour:

  • Error raised at the pre request stage : (Expected property name or '}' in JSON at position 23 (line 2 column 22))

It seems that the variables have not been replaced by their values before the graphql query syntax validation.

.bru file to reproduce the bug

ShowDefect.zip

Screenshots/Live demo link

Query sent through bruno

Image

Query sent through bruno cli

Image

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions