Docs
Launch GraphOS Studio

Rover template commands

For use with Apollo Federation


A supergraph (also called a federated ) is a graph composed of multiple subgraphs:

Supergraph (A + B + C)
Subgraph A
Subgraph B
Subgraph C

template commands help you create new from templated projects in various

.

This feature helps you quickly start up a new project or explore various implementations. If you want to contribute a new template,

!

Create a new subgraph

Run rover template use <PATH> to generate the boilerplate for a new . You can either use the guided wizard experience to select a template, or specify a template with the --template flag.

Using the wizard

Run rover template use <PATH> to start a wizard that helps you create a new project. The wizard walks you through a series of questions to help you choose a template.

rover template use my-new-subgraph

By default, the wizard prompts you for which programming language to use for your project. You can optionally provide a --language option to skip this prompt.

Run rover template use --help to see a list of available languages.

rover template use my-new-python-subgraph --language python

Skipping the wizard

If you know exactly which template you want to use, you can specify the --template option to skip the wizard:

rover template use my-new-javascript-subgraph --template subgraph-javascript-apollo-server

Use rover template list to see a list of available templates.

Listing available templates

The rover template list command lists each available template with its corresponding ID (which you can provide to the --template option of rover template use). It also displays each template's name, language, and Repo URL. To learn more about a specific template, go to its repo URL and see its README.md file.

This command accepts the same --language option as rover template use to filter the list of templates.

For a machine-readable output, use the --json flag.

Templates are currently available for the following libraries and languages:

LanguageNameIDTemplate Repository
C#
Hot Chocolate (Annotations)
subgraph-csharp-hot-chocolate
View repository
Go
Go (gqlgen)
subgraph-go-gqlgen
View repository
Java
Spring GraphQL
subgraph-java-spring-graphql
View repository
JavaScript
Apollo Server (JS)
subgraph-javascript-apollo-server
View repository
Kotlin
GraphQL Kotlin
subgraph-graphql-kotlin
View repository
Python
Strawberry with FastAPI
subgraph-python-strawberry-fastapi
View repository
Python
Ariadne with FastAPI
subgraph-python-ariadne-fastapi
View repository
Rust
async-graphql with Axum
subgraph-rust-async-graphql
View repository
TypeScript
Apollo Server (TS)
subgraph-typescript-apollo-server
View repository
Previous
supergraph
Next
Installation
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company