This repository was archived by the owner on Dec 19, 2023. It is now read-only.
ApolloPersistedQuerySupport - Query parameter not found in GET request #764
Unanswered
codingpierogi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to add ApolloPersistedQuerySupport in my Spring Boot application but I'm stuck on the GraphQL Exception "Query parameter not found in GET request.". Any help getting past this would be appreciated.
My React application, using @apollo/client@^3.5.5, issues the following HTTP request:
GET http://localhost:8080/graphql?variables=%7B%22locale%22%3A%22en%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%229bfd7a6b058c1c1a2b744eedeb6eff2bdcf231edfe67ac172c4177eb26a238c1%22%7D%7D
The GraphQL Server is then throwing a GraphQL Exception from GraphQLGetInvocationInputParser. As suggested by @jord1e in graphql-java/graphql-java#2647 I've tried autowiring the PreparsedDocumentProvider similar to:
`
@configuration
public class ApqConfig {
@bean
public PreparsedDocumentProvider apqProvider() {
return new ApolloPersistedQuerySupport(InMemoryPersistedQueryCache.newInMemoryPersistedQueryCache().build());
}
}`
Relevant dependencies:
org.springframework.boot:spring-boot:2.5.7
com.graphql-java-kickstart:graphql-spring-boot-starter:12.0.0
Any help to get past this is appreciated!
Thanks
Beta Was this translation helpful? Give feedback.
All reactions