Class ApolloPersistedQuerySupport
java.lang.Object
graphql.execution.preparsed.persisted.PersistedQuerySupport
graphql.execution.preparsed.persisted.ApolloPersistedQuerySupport
- All Implemented Interfaces:
PreparsedDocumentProvider
This persisted query support class supports the Apollo scheme where the persisted
query id is in
ExecutionInput.getExtensions().
You need to provide a PersistedQueryCache cache implementation
as the backing cache.
The Apollo client sends a hash of the persisted query in the input extensions in the following form
{
"extensions":{
"persistedQuery":{
"version":1,
"sha256Hash":"fcf31818e50ac3e818ca4bdbc433d6ab73176f0b9d5f9d5ad17e200cdab6fba4"
}
}
}
- See Also:
-
Field Summary
FieldsFields inherited from class PersistedQuerySupport
PERSISTED_QUERY_MARKER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPersistedQueryId(ExecutionInput executionInput) This method is required for concrete types to work out the query id (often a hash) that should be used to look up the persisted query in the cache.protected booleanpersistedQueryIdIsInvalid(Object persistedQueryId, String queryText) Methods inherited from class PersistedQuerySupport
getDocument, mkMissingErrorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PreparsedDocumentProvider
getDocumentAsync
-
Field Details
-
CHECKSUM_TYPE
- See Also:
-
-
Constructor Details
-
ApolloPersistedQuerySupport
-
-
Method Details
-
getPersistedQueryId
Description copied from class:PersistedQuerySupportThis method is required for concrete types to work out the query id (often a hash) that should be used to look up the persisted query in the cache.- Specified by:
getPersistedQueryIdin classPersistedQuerySupport- Parameters:
executionInput- the execution input- Returns:
- an optional id of the persisted query
-
persistedQueryIdIsInvalid
- Overrides:
persistedQueryIdIsInvalidin classPersistedQuerySupport
-