Follow-along: Schema publish
Goal: Finish the process of making changes to the supergraph by publishing the updated schema.
In a terminal window, paste in the
rover subgraph publish
command. Make sure you replace the parameters with your own values.rover subgraph publish poetic-plates-supergraph@main \--schema schema.graphql \--name recipesIf all goes well, we should see the terminal output with a message confirming that the subgraph has been published and the supergraph has been updated!
Navigate to the Launches page. Click on the latest launch in the list.
https://studio.apollographql.comLet's try running the same query from last time.
query GetRecipeTimes {randomRecipe {nameprepTime}}The query still runs and comes back successfully, but we get a warning in the Explorer (that yellow squiggly line!) that
prepTime
has been deprecated and not to use it anymore.
Our launch was successful! 🎉 We've made changes to our supergraph!
Check your understanding
Demo: Integrating into CI/CD
We recommend integrating the schema checks & publishing process into your CI/CD pipelines.
(Optional) If you'd like to see how to do this yourself with GitHub Actions, check out Lesson 6 of GraphOS: Safe API delivery.