question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing support for query variables

See original GitHub issue

Hello,

Thanks for your time and engagement in making work with graphql easier.

However one missing feature is support for query variables. Using graphql I write query like this:

query($name:String) { 
  user(name: $name) {
    id
    name
    surname
  }
}

and provide name’s value : {"name": "random_name"}

I would expect the same possibility using grapql-java-codegen lib.

Grapql query serialized to json may look like this:

{
    "query":
        "query($name:String) {
            user(name: $name) {
                id
                name
                surname
            }
        }"
    ,
    "variables": "{\"name\": \"random_name\"}"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SilverSheepcommented, Mar 15, 2021

Sorry for no response for so long. Thx for your comments. We’re using arrango db with foxx services and we have strict endpoints defined. I could use http query parameters when calling arrango, but this would mean change of foxx microservice. Because of business priorities I cannot afford to make this change now.

However, we’ve managed to make a workaround by creating our own GraphQLRequest json serializer which allows to pass a variable to variables section.

1reaction
jxnu-liguobincommented, Mar 7, 2021

@jxnu-liguobin, Exactly. Request works perfectly if variables put directly in the query and not in the “variables” section. So I don’t see any reason why they should be moved there. @SilverSheep, Please clarify.

The client really doesn’t care how to transfer parameters. Usually, the independent transmission is because the front end is more convenient for schema and data separation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to overcome missing query parameters in Databricks ...
I'm trying to build up my first dashboard based on Dataabricks SQL. As far as I can see if you define a query...
Read more >
Access SQL query missing more required parameters
Name , Item , and Picture are problem words in Access queries. Enclose them in square brackets: SELECT ItemName as [Name], ItemPicture as...
Read more >
Solved: User Defined Missing Values in Enterprise Guide
If the missing values are in all the 30 variables this means that i have to create 30 recodings using query builder which...
Read more >
Default value in a Query variable is missing
A variable screen with default Hierarchy value is being populated where user has an option to select a Hierarchy of his choice from...
Read more >
Support per query variables · Issue #4596 · vitessio/vitess
Both Percona and MariaDB support per query variables. It would be nice to support this construct as a pass through. Given the connection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found