Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
39 changes: 39 additions & 0 deletions 01-dgs-framework-basic-features/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
uploaded-images
.DS_Store
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions 01-dgs-framework-basic-features/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Java DGS Framework example (basic features)
=====

This repository is an example application for the [DGS Framework](https://netflix.github.io/dgs).
The example is a standalone GraphQL server in Java.

It shows the following features:
* Datafetchers
* Mutations
* DataLoader to prevent the N+1 problem
* Query testing
* Using a generated Query API
* File Upload
* Using the Gradle codegen plugin
* A custom instrumentation implementation
* Subscriptions
* Testing a subscription
* Registering an optional scalar from graphql-java


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 the 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.
File renamed without changes.
File renamed without changes.
178 changes: 89 additions & 89 deletions gradlew.bat → 01-dgs-framework-basic-features/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
39 changes: 39 additions & 0 deletions 02-dgs-framework-with-spring-data-jpa/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
uploaded-images
.DS_Store
Loading