You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/graphql/cachecontrol/CacheControl.java
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,11 @@
17
17
import static graphql.collect.ImmutableKit.map;
18
18
19
19
/**
20
+
* Apollo has deprecated their Cache Control specification https://github.com/apollographql/apollo-cache-control
21
+
* This has been deprecated/removed from Apollo some time.
22
+
* Apollo now provides an alternative approach via the @cacheControl directive https://www.apollographql.com/docs/apollo-server/performance/caching/
23
+
* We are deprecating CacheControl inside graphql-java and this will be deleted in a future release.
24
+
*
20
25
* This class implements the graphql Cache Control specification as outlined in https://github.com/apollographql/apollo-cache-control
21
26
* <p>
22
27
* To best use this class you need to pass a CacheControl object to each {@link graphql.schema.DataFetcher} and have them decide on
@@ -28,6 +33,7 @@
28
33
* Then at the end of the query you would call {@link #addTo(graphql.ExecutionResult)} to record the cache control hints into the {@link graphql.ExecutionResult}
29
34
* extensions map as per the specification.
30
35
*/
36
+
@Deprecated
31
37
@PublicApi
32
38
public class CacheControl {
33
39
@@ -81,7 +87,10 @@ private CacheControl() {
81
87
* @param maxAge the caching time in seconds
82
88
* @param scope the scope of the cache control hint
83
89
* @return this object builder style
90
+
*
91
+
* @deprecated - Apollo has deprecated the Cache Control specification
84
92
*/
93
+
@Deprecated
85
94
public CacheControl hint(ResultPath path, Integer maxAge, Scope scope) {
0 commit comments