Skip to content

felipe-gdr/spring-graphql-defer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example GraphQL backend service that has support for the @defer directive. Please notice that this service uses experimental graphql-java APIs, and @defer support in graphql-java is still under very active development.

Testing a Query

curl:

curl -v http://localhost:8080/graphql -H "Content-Type:application/json" --data \
'{"query": "query bookTestSimple { bookById(id: \"book-1\") { name ... @defer { author { firstName } } } ... @defer { book2: bookById(id: \"book-2\") { name } } }"}'

Apollo Sandbox:

GraphiQL doen't work due to the GraphQL path being overridden, but you can use Apollo Sandbox instead.

Example query:

query bookTestSimple {
  bookById(id: "book-1") {
    name
    ... @defer {
      author {
         firstName
      }
    }
  }
  ... @defer {
    book2: bookById(id: "book-2") {
      name
    }
  }
}

About

This is an example GraphQL backend service that has support for the `@defer` directive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages