You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When extracting the returned value information from the graphql client interface, the extractValueAsObject method of the GraphQLResponse object is used to extract the data.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thank you for providing a great open source for graphql. I have a question while using it.
My project uses graphqlcodegen-maven-plugin to generate graphql client code.
Programming language is
java
.Relevant dependencies are as follows.
When extracting the returned value information from the graphql client interface, the
extractValueAsObject
method of theGraphQLResponse
object is used to extract the data.The implementation method is as follows:
As we all know, the extractValueAsObject method supports two data extraction methods:
Ticks ticks = response.extractValueAsObject("ticks", Ticks.class)
List<Route> routes = response.extractValueAsObject("ticks.edges[*].node.route", new TypeRef<List<Route>>(){})
My current problems:
How to dynamically construct the first JsonPath parameter of extractValueAsObject through the code generated by graphqlcodegen-maven-plugin?
I need to construct parameters such as "submitReview. edges [*]. node. submittedBy" to directly extract the return value.
Thank you very much for your patience.
Beta Was this translation helpful? Give feedback.
All reactions