@PublicApi public class ApolloPersistedQuerySupport extends PersistedQuerySupport
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"
}
}
}
ExecutionInput.getExtensions()PERSISTED_QUERY_MARKER| Constructor and Description |
|---|
ApolloPersistedQuerySupport(PersistedQueryCache persistedQueryCache) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Optional<java.lang.Object> |
getPersistedQueryId(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 boolean |
persistedQueryIdIsInvalid(java.lang.Object persistedQueryId,
java.lang.String queryText) |
getDocument, mkMissingErrorpublic ApolloPersistedQuerySupport(PersistedQueryCache persistedQueryCache)
protected java.util.Optional<java.lang.Object> getPersistedQueryId(ExecutionInput executionInput)
PersistedQuerySupportgetPersistedQueryId in class PersistedQuerySupportexecutionInput - the execution inputprotected boolean persistedQueryIdIsInvalid(java.lang.Object persistedQueryId,
java.lang.String queryText)
persistedQueryIdIsInvalid in class PersistedQuerySupport