Star Wars Demo Application
Overview¶
This application implements a comprehensive GraphQL API for the Star Wars universe, demonstrating how Viaduct handles complex data relationships, advanced resolver patterns, and sophisticated schema design.
Requirements¶
- JDK 17+ for Kotlin, or JDK 21+ for the Java demo, and
git(see Project Setup). - A clone of the demo for your chosen language, using the commands below.
- Linux, Mac, or Windows
What you'll find¶
Both language versions showcase the following patterns. Select a language tab on any page; the selection carries across this tutorial:
- Global IDs — Viaduct's identity model and how
Nodetypes are referenced. - Node Resolvers — direct object resolution by Global ID.
- Field Resolvers — field-level computation and lightweight lookups.
- Batch Resolvers — efficient bulk data loading.
- Resolver Integration Patterns — how the layers compose at execution time.
- Mutations — modifying data through GraphQL mutations.
- Variables — dynamic variable provision.
- Backing Data — sharing pre-fetched data between sibling resolvers via
@backingData.
Getting the Star Wars application¶
Running the application¶
Follow the instructions in the repository's README to build and run the application:
The demo builds against the current Viaduct development snapshot. The environment flag enables the snapshot repository for both plugins and dependencies. On Windows, use Git Bash for these commands.
Open GraphiQL and try:
The first character is Luke Skywalker. Stop the server with Ctrl+C.
After exploring the Star Wars application, you'll have a solid understanding of how to build production-ready GraphQL applications with Viaduct.
What's Next¶
Continue to Core Concepts to walk through Viaduct's foundational building blocks as they appear in this demo.