Interface AutomaticPersistedQueriesCache

  • All Implemented Interfaces:
    graphql.execution.preparsed.persisted.PersistedQueryCache

    
    public interface AutomaticPersistedQueriesCache
     implements PersistedQueryCache
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      PreparsedDocumentEntry getPersistedQueryDocument(Object persistedQueryId, ExecutionInput executionInput, PersistedQueryCacheMiss onCacheMiss)
      CompletableFuture<PreparsedDocumentEntry> getPersistedQueryDocumentAsync(Object persistedQueryId, ExecutionInput executionInput, PersistedQueryCacheMiss onCacheMiss)
      abstract CompletableFuture<PreparsedDocumentEntry> getOrElse(String key, ExecutionInput executionInput, Function0<PreparsedDocumentEntry> supplier) Get the PreparsedDocumentEntry associated with the key from the cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getPersistedQueryDocument

        @Deprecated(message = "deprecated in favor of async retrieval of PreparsedDocumentEntry", replaceWith = @ReplaceWith(imports = {}, expression = "getPersistedQueryDocumentAsync(persistedQueryId, executionInput, onCacheMiss)")) PreparsedDocumentEntry getPersistedQueryDocument(Object persistedQueryId, ExecutionInput executionInput, PersistedQueryCacheMiss onCacheMiss)
      • getOrElse

         abstract CompletableFuture<PreparsedDocumentEntry> getOrElse(String key, ExecutionInput executionInput, Function0<PreparsedDocumentEntry> supplier)

        Get the PreparsedDocumentEntry associated with the key from the cache.

        If the PreparsedDocumentEntry is missing in the cache, the supplier will provide one, and then it should be added to the cache.

        Parameters:
        key - The hash of the requested query.
        executionInput - the resource that GraphQL operation.
        supplier - that will provide the document in case there is a cache miss.