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
Is your feature request related to a problem? Please describe.
There is a query caching mechanism in graphql-java to cache the client query to reusable PreparsedDocumentEntry so that latter queries will no longer need to parse the query trees. I analyzed that this cache is useful to increase performance for GraphQL applications that usually takes in complicated but limited queries.
The query caching document suggests to move parameters and arguments into query variables to achieve high cache hit ratio, which is currently not provided by our client side code generator.
Describe the solution you'd like
Add query variables in GraphQL request payload, which requires client code generator adding a new feature. Currently if we use generated code, all variables are hard-coded in the query body itself.
The ideal scenario would be:
When new GraphQLRequest(operationRequest, responseProjection) is called, the inside logic can extract all arguments (including input type) into query variables.
Describe alternatives you've considered
The queries could be alternatively parsed by manipulating the string and extracting variables, either in client side before performing HTTP call, or in server side once we receive the request payload. But it would be better for the library to have this feature.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There is a query caching mechanism in
graphql-java
to cache the client query to reusablePreparsedDocumentEntry
so that latter queries will no longer need to parse the query trees. I analyzed that this cache is useful to increase performance for GraphQL applications that usually takes in complicated but limited queries.The query caching document suggests to move parameters and arguments into query variables to achieve high cache hit ratio, which is currently not provided by our client side code generator.
Describe the solution you'd like
Add query variables in GraphQL request payload, which requires client code generator adding a new feature. Currently if we use generated code, all variables are hard-coded in the query body itself.
The ideal scenario would be:
When
new GraphQLRequest(operationRequest, responseProjection)
is called, the inside logic can extract all arguments (includinginput
type) into query variables.Describe alternatives you've considered
The queries could be alternatively parsed by manipulating the string and extracting variables, either in client side before performing HTTP call, or in server side once we receive the request payload. But it would be better for the library to have this feature.
The text was updated successfully, but these errors were encountered: