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.

Support of parametrized fields in ResponseProjection

See original GitHub issue

Hi,

First, thanks for this project! My team and I want to use your project for testing our GraphQL API with RestAssured. Your generated GraphQL client-side does exactly what we are looking for 😃 Moreover, the automation with Maven plugin is perfect!

However, I have a question about ResponseProjection.

Here, my simple schema:

type Query {
    itemById(id: Int!): Item!
}

type Item {
  name: String
  tags (max:Int): [String]
}

Generated OperationRequest and ResponseProjection allow me to write request as follow:

ItemByIdQueryRequest query = new ItemByIdQueryRequest.Builder()
                                                          .setId(1)
                                                          .build();
        
ItemResponseProjection fields = new ItemResponseProjection()
                                                          .name()
                                                          .tags();
GraphQLRequest request = new GraphQLRequest(query, fields);

… which generates GraphQL following query:

{"query":"query { itemById(id: 1){ name tags } }"}

But, my question is: how to give “max” parameter to the “tags” fields? And so, how to generate this query for example:

{"query":"query { itemById(id: 1){ name tags(max: 10) } }"}

It seems that we cannot generate this query, but maybe I forget something?

Thank you for your time, Laura

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kobylynskyicommented, May 26, 2020

@lmartellotto I will start working on this feature request if you don’t mind.

1reaction
lmartellottocommented, May 26, 2020

Thanks for your reply.

It’s great to know it could be available in the future 😃 Maybe I can help with a PR… Are you open to that ? I will investigate and keep you in touch if I start anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Field Projections - LinkedIn - Microsoft Learn
Field projections are defined using the &fields= query parameter and narrowed by providing a comma-separated list of field names that you want ...
Read more >
Using Multiple input parameters in a Projection
Hello Experts, I have defined two input parameters on a table in a projection node, one this input parameter is mandt and the...
Read more >
Parameters - Looker Studio Help - Google Help
Parameters let you interact with user-provided data. For example, you can create calculated fields that include input from people using your report, ...
Read more >
How to identify output parameter in projection action
I need to identify output parameter in action as I need to update data and return something like crud_new .
Read more >
How to use multiple fields to make a parameter?
I am designing a report in report builder where two parameters are needed, one parameter for the projection and another parameter for a ......
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