-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve HTTP cache headers. #51
base: master
Are you sure you want to change the base?
Conversation
@@ -64,6 +64,7 @@ public void schemaConfigTest() { | |||
// -using default resolver builders | |||
Assert.assertNotNull(schema.getQueryType().getFieldDefinition("greetingFromBeanSource_wiredAsComponent_byMethodName")); | |||
Assert.assertNotNull(schema.getQueryType().getFieldDefinition("greetingFromBeanSource_wiredAsComponent_byAnnotation")); | |||
Assert.assertNotNull(schema.getQueryType().getFieldDefinition("greetingFromBeanSource_wiredAsComponent_byAnnotation_withCacheHint")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit Test Fails.
I don't know how to solve it.
Please let me know.
@@ -135,6 +138,12 @@ public String getGreeting(){ | |||
return "Hello world !"; | |||
} | |||
|
|||
@GraphQLQuery(name = "greetingFromBeanSource_wiredAsComponent_byAnnotation_withCacheHint") | |||
public String getGreeting2(@GraphQLEnvironment ResolutionEnvironment env){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove argument, success to pass schemaConfigTest
Thanks a bunch for the contribution! |
@kaqqao Thank you for developing a great project! I love this.
I want to use Apollo Http cache headers, so I added implementation.
Since this is the almost first time to commit OSS, please point out whatever you want.
https://www.apollographql.com/docs/apollo-server/features/caching/#serving-http-cache-headers
https://github.com/apollographql/apollo-server/blob/d5015f4ea00cadb2a74b09956344e6f65c084629/packages/apollo-cache-control/src/index.ts#L180