Skip to content
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
24 changes: 24 additions & 0 deletions .github/workflows/apollo-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Apollo Check
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
APOLLO_VCS_BRANCH: ${{ github.head_ref }}
APOLLO_VCS_COMMIT: ${{ github.event.pull_request.head.sha }}
steps:
- uses: actions/checkout@v4
- uses: apollographql-gh-actions/install-rover@v1
- uses: apollographql-gh-actions/rover-subgraph-lint@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ secrets.APOLLO_GRAPH_REF }}
name: github
schema: ./github.graphql
- uses: apollographql-gh-actions/rover-subgraph-check@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ secrets.APOLLO_GRAPH_REF }}
name: github
schema: ./github.graphql
19 changes: 19 additions & 0 deletions .github/workflows/apollo-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Apollo Publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
environment: apollo
steps:
- uses: actions/checkout@v4
- uses: apollographql-gh-actions/install-rover@v1
- uses: apollographql-gh-actions/rover-subgraph-publish@v1
with:
apollo-key: ${{ secrets.APOLLO_KEY }}
graph-ref: ${{ secrets.APOLLO_GRAPH_REF }}
name: github
schema: ./github.graphql
no-url: true
43 changes: 43 additions & 0 deletions github.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
extend schema
@link(url: "https://specs.apollo.dev/federation/v2.10", import: ["@key"])
@link(
url: "https://specs.apollo.dev/connect/v0.1"
import: ["@connect", "@source"]
)
@source(
name: "github"
http: {
baseURL: "https://api.github.com"
headers: [
{ name: "Accept", value: "application/vnd.github+json" }
{ name: "User-Agent", value: "{$config.agent}" }
{ name: "Authorization", value: "token {$config.token}" }
]
}
)

type Query {
"All trees in the leetcode-study repository"
gitTrees: [GitTree]!
@connect(
source: "github"
# https://docs.github.com/en/rest/git/trees#get-a-tree
http: {
GET: "/repos/DaleStudy/leetcode-study/git/trees/main?recursive=1"
}
selection: """
$.tree {
type
path
}
"""
)
}

"A file or directory in the Git repository"
type GitTree {
"The type of the node"
type: String!
"The path of the node"
path: String!
}
58 changes: 0 additions & 58 deletions products.graphql

This file was deleted.