grapql rover and router workflow
To compose your supergraph, first we need to create individual schema for example product, review and user graphql schema. And we also need a supergraph.yaml first
Let's create our supergraph
rover supergraph compose --config ./supergraph.yaml > supergraph.graphqlIf you're using powershell
rover supergraph compose --config ./supergraph.yaml | Out-File -Encoding utf8 supergraph.graphql
We will now have a combined supergraph schema that includes product, review and user graphql.
To perform checks we need to have graphos integration
rover subgraph check my-review@my-variant --schema ./review.graphql --name review
rover subgraph check my-product@my-variant --schema ./product.graphql --name product
rover subgraph check my-user@my-variant --schema ./user.graphql --name userAnd it is time to run
rover dev --supergraph-config ./supergraph.yaml
And then run it using router
c:\tools\router --config router.yaml --supergraph supergraph.graphql
The github repo for product, review and user schema is here
https://github.com/kepungnzai/graphql-workflow
Comments