Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rover check command #92

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading