We are trying to consume the persistent query created in AEM inside the Java backend code using the Apollo Graphql client. The persistent query is working fine directly in the browser as well as Java backend codebase is fetching the result for a normal graphql query with the Post request but somehow throwing an error for the persistent query with the Get request. Wondering if anyone consumed persistent queries with the help of the Apollo Graphql client and provide some sample code?
@Manu_Mathew_ , Apollo client supports automatic persisted queries. AEM has queries already persisted with a given name and does not accept the query passed on by the client which has the list of variables and a hash for the query. Once this is persisted on the server end, further calls from the client would only include the variables and the hash. Wondering if AEM supports such a feature for persistence where it accepts the queries from the client and stores the hash?
Hi @krati_garg , Yes, we need to pass a few parameters. It seems the Apollo client doesn't provide the option to perform Get request to a persistent query. We were able to consume it using a regular Rest call. Ask is if someone has used the Apollo client to call persistent queries and provide some code snippets.