Welcome to the starter code for GraphQL Federation with Java & DGS. This is the second course in our GraphQL and DGS series. You can find the course lessons and instructions on Odyssey, Apollo's learning platform.
The course will walk you step by step on what to do. The code in this repository picks up where the project from Intro to GraphQL with Java & DGS leaves off; if you'd like, follow along with this course using your own repo! If you need a refresher on GraphQL concepts, jump back into the first course and join us here when you are ready.
This project uses Java and requires JDK 17. To start the project, open a new terminal in the soundtracks
directory and run:
./gradlew bootRun
Or open soundtracks
in your IDE, navigate to the SoundtracksApplication.java
file and click Run
.
The final
branch of this repo contains the final stage of the course, with all of the steps and code completed! If you get stuck, you can refer to it and compare your code.
This repo is not regularly monitored.
For any issues or problems concerning the course content, please refer to the Odyssey topic in our community forums. You can also join the Apollo Discord.
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Create an OCI image
- Spring Web
Please revisit the first course in this series anytime if you get stuck or need a refresher.
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
These additional references should also help you:
This project has been configured to use the Netflix DGS Codegen plugin.
This plugin can be used to generate client files for accessing remote GraphQL services.
The default setup assumes that the GraphQL schema file for the remote service is added to the src/main/resources/schema/
location.
You can learn more about the plugin configuration options and how to use the generated types to adapt the default setup.