Skip to content

Gem-of-True-Sight/dgs-examples-java

 
 

Repository files navigation

Java DGS Framework example

This repository is an example application for the DGS Framework. The example is a standalone GraphQL server in Java.

It shows the following features:

Other examples

There are other examples of using the DGS framework as well:

Shows and Reviews

This example is built around two main types: Show and Review. A Show represents a series or movie you would find on Netflix. For ease of running the demo, the list of shows is hardcoded in ShowsServiceImpl. A show can have Reviews. Again, for ease of running the demo, a list of reviews is generated during startup for each show in DefaultReviewsService.

Reviews can also be added by users of the API using a mutation, and a GraphQL Subscription is available to watch for added reviews.

There's also a mutation available to add Artwork for a show, demonstrating file uploads. Uploaded files are stored in a folder uploaded-images in the work directory where ethe application is started.

Starting the example

The example requires Java 11. Run the application in an IDE using its main class or using Gradle:

./gradlew bootRun

Interact with the application using GraphiQL on http://localhost:8080/graphiql.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 91.2%
  • Kotlin 8.8%