spring-projects / spring-projects/spring-graphql
How to make a graphql request for persisted queries using HttpGraphQlClient in spring graphql?
@bclozel is already working on this.
Since Dec 3, 2025.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
I have spring boot graphql server side and spring graphql client side applications. The client graphql queries are persisted in graphql-server-side. Now from the graphql-client-side application, how to make the graphql requests using the sha256 hash of the graphql query using HttpGraphQlClient?
I know that we pass the sha256 hash in the 'extensions' key of the request body. But to access RequestSpec's extensions() method, GraphQlClient contract exposes two methods RequestSpec document(String document) and RequestSpec documentName(String document). One way it to do is graphQlClient.document(null).extensions(Map.of(...)).executeSync(), but the parameter for document() method is not nullable so that doesn't work.
Basically, how to make a graphql request with the hash of a persisted query using HttpGraphQlClient? Or is this not supported yet?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.