Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ttyniwa
Copy link

@ttyniwa ttyniwa commented Aug 26, 2019

@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

@@ -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"));
Copy link
Author

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){
Copy link
Author

@ttyniwa ttyniwa Aug 26, 2019

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

@kaqqao
Copy link
Member

kaqqao commented Nov 4, 2019

Thanks a bunch for the contribution!
Looking very nice in general, but there a few points I need to think through...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants