A Netflix DGS (Domain Graph Service) GraphQL application built with Spring Boot and Java 21.
- GraphQL API for querying TV shows
- Spring Boot 4.0.5 with Netflix DGS starter
- Query filtering by title
- Comprehensive test suite
- GraphQL Endpoint:
http://localhost:8080/graphql - GraphiQL UI:
http://localhost:8080/graphiql(for interactive testing)
query {
show {
title
rating
genre
releaseDate
}
}query {
show(titleFilter: "Breaking") {
title
rating
genre
}
}Visit http://localhost:8080/graphiql to access the interactive GraphQL IDE.
Features:
โถ๏ธ Run Query: PressCtrl+Enteror click the play button to execute- ๐ฏ Auto Complete: Press
Spaceor start typing for suggestions - ๐ Schema Documentation: View all available queries and fields
- ๐ Real-time Results: See response data formatted as JSON
Example Query in GraphiQL:
{
show {
rating
genre
releaseDate
}
}This will return all TV shows with their rating, genre, and release date in the right panel.
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "query { show { title rating genre } }"}' \
http://localhost:8080/graphqlcurl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "query { show(titleFilter: \"Breaking\") { title rating genre } }"}' \
http://localhost:8080/graphql./gradlew build./gradlew bootRun./gradlew test- Framework: Spring Boot 4.0.5
- GraphQL: Netflix DGS 11.0.0
- Java: OpenJDK 21
- Build Tool: Gradle
src/
โโโ main/
โ โโโ java/com/rajdip14/dgs/
โ โ โโโ DgsApplication.java
โ โ โโโ graphql/ShowsDataFetcher.java
โ โโโ resources/
โ โโโ schema/schema.graphqls
โโโ test/
โโโ java/com/rajdip14/dgs/DgsApplicationTests.java