Class SimpleGraphQLCacheProvider

    • Constructor Detail

      • SimpleGraphQLCacheProvider

        public SimpleGraphQLCacheProvider()
    • Method Detail

      • cacheQuery

        @Nullable
        public @Nullable String cacheQuery​(@NotNull
                                           @NotNull String query,
                                           @NotNull
                                           @NotNull String resourceType,
                                           @Nullable
                                           @Nullable String selectorString)
        Description copied from interface: GraphQLCacheProvider
        Stores the query into the cache, potentially overriding a previous value. The method will return the query's SHA-256 hash if the persisting operation was successful. If not, a null value must be returned.
        Specified by:
        cacheQuery in interface GraphQLCacheProvider
        Parameters:
        query - the GraphQL query
        resourceType - the resource type of the GraphQLServlet which will execute the query, since multiple servlets can be registered
        selectorString - the selector string with which the GraphQLServlet is registered
        Returns:
        the query's SHA-256 hash, if the query was successfully cached; null if the query could not be cached