-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add section on operation caching to reference documentation #233
Add section on operation caching to reference documentation #233
Conversation
Thanks for the suggestion. It is already possible to get access to @Bean
public GraphQlSourceBuilderCustomizer reactiveQuerydslRegistrar() {
return sourceBuilder -> {
PersistedQueryCache cache = new InMemoryPersistedQueryCache(new HashMap<>());
ApolloPersistedQuerySupport provider = new ApolloPersistedQuerySupport(cache);
sourceBuilder.configureGraphQl(builder -> builder.preparsedDocumentProvider(provider));
};
} I'm wondering why we should add this as an explicit option? It is a little more convenient, but no other benefit I can see and we don't need to mirror all available options on |
I have reflected on this a little bit. DGS Framework has the option of specify a bean, which injects the Specifying a After introducing the Specifying a |
I appreciate the further insight. The aim for methods on In terms of the importance, I'm keen on adding to the documentation in the section on GraphQlSource where we elaborate on a range of things you can configure, providing mentions mentions for things that people look for and it helps them to get oriented. |
So adding automatic registration of a I can edit the pull request to add documentation in that case. |
Correct, no plans at the moment to add detection of |
# Conflicts: # spring-graphql/src/main/java/org/springframework/graphql/execution/DefaultGraphQlSourceBuilder.java
1748866
to
65545a7
Compare
65545a7
to
9f9d093
Compare
@rstoyanchev Ready for review, sorry for the delay |
Important to mention the `GraphQlSourceBuilderCustomizer` which is otherwise mentioned neither in the Boot starter nor the reference here. It is the path to a number of customizations that are discussed in `GraphQlSource` subsections. See gh-233
I changed this slightly to refer to the GraphQL Java documentation for most of the details, and for the rest focus on Spring GraphQL specific config. One more note that the processing of the PR was more time complicated than necessary because the main branch was merged into the PR branch. This is a problem because the commits need to be squashed. So generally, either use rebase or otherwise do not worry if it gets behind. We'll take care to rebase it before merging. |
Closes #234
Hello,
This PR adds support for PreparsedDocumentProvider.
GraphQL Java documentation is available here: https://www.graphql-java.com/documentation/execution#query-caching
This also adds support for Apollo Persisted Queries via PersistedQuerySupport and ApolloPersistedQuerySupport- an implementation example or integration test for this may be wanted in the future
There are a couple of pain points that need to be resolved before merging: