Skip to content

Instantly share code, notes, and snippets.

View busches's full-sized avatar

Scott Busche busches

  • Des Moines, Iowa
View GitHub Profile
@busches
busches / rover_check_markdown.sh
Last active September 23, 2021 19:15 — forked from EverlastingBugstopper/rover_check_markdown.sh
A shell script to parse the JSON output of `rover subgraph check` or `rover graph check`
#!/usr/bin/env sh
set -euo pipefail
# This script performs a subgraph check and generates a markdown file from Rover's JSON output
# Change the following line to refer to your graph ref, schema, and subgraph name
CHECK_OUTPUT=$(rover subgraph check my-graph --schema ./products.graphql --name products --output json) || true
CHECK_SUCCESS=$(echo $CHECK_OUTPUT | jq '.data.success')
if [ $CHECK_SUCCESS = "true" ]; then