Skip to content

Commit

Permalink
Update .github/workflows/pull-request.yml
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 5f95ed2 commit b77fdda
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,20 @@ jobs:

- name: Validate GraphQL schema
run: |
# Install graphql-inspector if not already installed
npm install -g @graphql-inspector/cli@latest
# Check if any .graphql files exist
if ! find src -name "*.graphql" -type f | grep -q .; then
echo "Warning: No .graphql files found in src directory"
exit 0
fi
# Check if schema.graphql exists
if [ ! -f "schema.graphql" ]; then
echo "Error: schema.graphql not found in the root directory"
exit 1
fi
npx graphql-inspector validate schema.graphql "src/**/*.graphql"
Graphql-Inspector:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Runs Introspection on the GitHub talawa-api repo on the schema.graphql file
Expand Down

0 comments on commit b77fdda

Please sign in to comment.