Skip to content

Instantly share code, notes, and snippets.

@Collin3
Collin3 / apoll-schema-check.sh
Last active Oct 13, 2021
Script to convert Apollo Schema Check JSON responses to markdown for github comments.
View apoll-schema-check.sh
#!/usr/bin/env sh
set -euo pipefail
# 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)CHECK_SUCCESS=$(echo $CHECK_OUTPUT | jq '.data.success')
if [ $CHECK_SUCCESS = "true" ]; then
echo "### Status: :white_check_mark:"
echo ""
fi