Skip to content

Is there any built in @defer support? #324

Answered by neerajsu
Roundaround asked this question in Q&A
Discussion options

You must be logged in to vote

@Roundaround

Okay I figured out a small clean hack to get it to work with minimal effort

graphql-java project has inbuilt @defer support. The directives can be defined while creating a GraphQLSchema Object. Previously @defer directive was enabled by default. But now it is disabled by default. So, you need to enable it by adding graphql.Directives.DeferDirective to the set of derectives.

In this graphql-java-tools project, you can technically create a GraphQLSchema object and expose it as a bean and the kickstart autoconfigure will pick it up. Problem is, when you create a GraphQLSchema object you need to define all the resolvers and types etc, which is all boilerplate code. This project a…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vojtapol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #324 on December 21, 2020 15:51.