Skip to content

Commit

Permalink
Add rover check command (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
smyrick authored Jun 18, 2024
1 parent 02091a3 commit 65ec8b3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 33 deletions.
80 changes: 48 additions & 32 deletions .github/workflows/pr-check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,52 +33,68 @@ jobs:
- uses: apollosolutions/rover-actions/install-rover-cli@v1

- name: Check checkout subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name checkout \
--schema ./subgraphs/checkout/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: checkout
schema: ./subgraphs/checkout/schema.graphql

- name: Check discovery subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name discovery \
--schema ./subgraphs/discovery/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: discovery
schema: ./subgraphs/discovery/schema.graphql

- name: Check inventory subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name inventory \
--schema ./subgraphs/inventory/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: inventory
schema: ./subgraphs/inventory/schema.graphql

- name: Check orders subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name orders \
--schema ./subgraphs/orders/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: orders
schema: ./subgraphs/orders/schema.graphql

- name: Check products subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name products \
--schema ./subgraphs/products/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: products
schema: ./subgraphs/products/schema.graphql

- name: Check reviews subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name reviews \
--schema ./subgraphs/reviews/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: reviews
schema: ./subgraphs/reviews/schema.graphql

- name: Check shipping subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name shipping \
--schema ./subgraphs/shipping/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: shipping
schema: ./subgraphs/shipping/schema.graphql

- name: Check users subgraph
run: |
rover subgraph check apollo-retail-supergraph@prod \
--name users \
--schema ./subgraphs/users/schema.graphql
uses: apollosolutions/rover-actions/subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: apollo-retail-supergraph@prod
name: users
schema: ./subgraphs/users/schema.graphql

actionlint:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"start": "node index.js",
"test": "npm run test:compile && npm run test:compose",
"test:compose": "APOLLO_ELV2_LICENSE=accept rover supergraph compose --config supergraph-config-dev.yaml --output supergraph.graphql",
"test:compile": "tsc"
"test:compile": "tsc",
"test:partial-schema-schema": "rover subgraph check apollo-retail-supergraph@prod --name checkout --schema ./subgraphs/checkout/schema.graphql"
},
"dependencies": {
"@apollo/server": "^4.9.5",
Expand Down

0 comments on commit 65ec8b3

Please sign in to comment.