Skip to content

Commit

Permalink
tests: fix script for checking mobile compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Dec 20, 2023
1 parent fbcaf2e commit 6511857
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ci/tasks/check-mobile-schema-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ curl -fsS https://raw.githubusercontent.com/GaloyMoney/galoy-mobile/main/app/gra

echo Checking compatibility with current main branch of galoy-mobile
npx @graphql-inspector/cli validate ./main.gql repo/core/api/src/graphql/public/schema.graphql --apollo --noStrictFragments
if [ $? -ne 0 ]; then
echo "Schema is not compatible with galoy-mobile"
exit 1
fi

for file in mobile-deployments/deployed-schemas/*
do
filename=$(basename "$file")
echo Checking compatibility with ${filename%.*}
npx @graphql-inspector/cli validate $file repo/core/api/src/graphql/public/schema.graphql --apollo --noStrictFragments
if [ $? -ne 0 ]; then
echo "Schema is not compatible with ${filename%.*}"
exit 1
fi
done

0 comments on commit 6511857

Please sign in to comment.