This guide offers a hands-on introduction to Cosmo using a sample demo repository. You’ll set up the demo subgraphs and Cosmo Router locally, allowing you to start querying right away.
Posts
and Users
) as well as a Router.
The example project is available here: https://github.com/wundergraph/cosmo-demo, or you can clone it with the following command:
start-subgraphs.sh
script is executable:
id
, run the following query:
id
, run the following query:
graph.localhost.yaml
configuration file for the wgc
CLI tool to introspect and generate a router configuration.
graph.yaml
instead of graph.localhost.yaml
.
router
directory.
router
directory, start the router using Docker. Make sure Docker is running on your machine before proceeding.
We recommend using Docker to prevent dependency conflicts and maintain a consistent environment.