Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

GraphQLResponseCache support #400

Merged
merged 6 commits into from
Dec 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Copyright (c) 2016 oEmbedler Inc. and Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the following conditions:
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
Expand Down Expand Up @@ -51,7 +51,7 @@ subprojects {
group "$PROJECT_GROUP"

repositories {
// mavenLocal()
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import graphql.kickstart.servlet.AbstractGraphQLHttpServlet;
import graphql.kickstart.servlet.GraphQLConfiguration;
import graphql.kickstart.servlet.GraphQLHttpServlet;
import graphql.kickstart.servlet.cache.GraphQLResponseCacheManager;
import graphql.kickstart.servlet.config.DefaultGraphQLSchemaServletProvider;
import graphql.kickstart.servlet.config.GraphQLSchemaServletProvider;
import graphql.kickstart.servlet.context.GraphQLServletContextBuilder;
Expand Down Expand Up @@ -130,6 +131,9 @@ public class GraphQLWebAutoConfiguration {
@Autowired(required = false)
private BatchInputPreProcessor batchInputPreProcessor;

@Autowired(required = false)
private GraphQLResponseCacheManager responseCacheManager;

@PostConstruct
void postConstruct() {
if (errorHandler != null) {
Expand Down Expand Up @@ -284,6 +288,7 @@ public GraphQLConfiguration graphQLServletConfiguration(GraphQLInvocationInputFa
.with(graphQLServletProperties.getSubscriptionTimeout())
.with(batchInputPreProcessor)
.with(graphQLServletProperties.getContextSetting())
.with(responseCacheManager)
.build();
}

Expand Down