Skip to content
Open
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
93 changes: 93 additions & 0 deletions .github/workflows/library_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Generate Library Metadata

on:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:

jobs:
build-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- name: generate matrix
id: matrix
run: |
echo "matrix=$(ls implementations | jq -cnR '[inputs | select(. | test("^[a-z]") and . != "appsync" and . != "stepzen" and . != "dgraph")]')" >> $GITHUB_OUTPUT

metadata:
needs: build-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- name: Read Subgraph GH Details
id: subgraph_details
run: |
echo "REPOSITORY_NAME=$(jq -r '.repository.name' implementations/${{ matrix.name }}/metadata.json)" >> $GITHUB_OUTPUT
echo "REPOSITORY_OWNER=$(jq -r '.repository.owner' implementations/${{ matrix.name }}/metadata.json)" >> $GITHUB_OUTPUT
- uses: octokit/[email protected]
id: repository_metadata
with:
query: |
query repositoryMetadata($owner:String!,$repo:String!) {
repository(owner:$owner,name:$repo) {
description
stargazerCount
releases(first:1) {
nodes {
publishedAt
}
}
}
}
owner: ${{ steps.subgraph_details.outputs.REPOSITORY_OWNER }}
repo: ${{ steps.subgraph_details.outputs.REPOSITORY_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: "echo 'latest release: ${{ steps.repository_metadata.outputs.data }}'"
- run: |
echo '${{ steps.repository_metadata.outputs.data }}' | jq '.["description"] = .repository.description | .["stargazerCount"] = .repository.stargazerCount | .["lastRelease"] = .repository.releases.nodes[0].publishedAt | del(.repository)' > github_metadata.json
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}
path: github_metadata.json
retention-days: 1

update_metadata:
needs: metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Metadata
uses: actions/download-artifact@v3
with:
path: implementations
- name: Check if there are any updates
id: git_updates
run: |
if [ -n "$(git status --porcelain)" ];
then
echo "GIT_UPDATES=false" >> $GITHUB_OUTPUT
else
echo "GIT_UPDATES=true" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: ${{ steps.git_updates.outputs.GIT_UPDATES }}
run: |
git config user.email "[email protected]"
git config user.name "github-action"
git checkout -b metadata_updates
git add .
git commit -m 'docs: subgraph library metadata updates'
git push origin metadata_updates
- name: Create PR
run: |
gh pr create -B main -H metadata_updates --title 'docs: subgraph library metadata updates' --body 'Created by Github Action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/test-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: generate matrix
id: matrix
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Federation JVM Test
name: Spring GraphQL Test

on:
pull_request:
branches:
- main
paths:
- 'implementations/federation-jvm/**'
- 'implementations/spring-graphql/**'

jobs:
compatibility:
uses: ./.github/workflows/test-subgraph.yaml
with:
library: "federation-jvm"
library: "spring-graphql"

pr-info:
uses: ./.github/workflows/save-pr-info.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Generate Results Summary
run: |
if [[ ${{ inputs.format }} == "json" ]]; then
jq -s '.[0] + {tests: .[1]}' implementations/${{ inputs.library }}/metadata.json results.json > results-${{ inputs.library }}.json
jq -s '.[0] + .[1] + {tests: .[2]}' implementations/${{ inputs.library }}/github_metadata.json implementations/${{ inputs.library }}/metadata.json results.json > results-${{ inputs.library }}.json
echo "RESULTS_FILE=results-${{ inputs.library }}.json" >> $GITHUB_ENV
else
cat results.md >> $GITHUB_STEP_SUMMARY
Expand Down
5 changes: 3 additions & 2 deletions implementations/_template_hosted_/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullName": "Full library name; if left blank the implementation folder name will be used",
"language": "Other Solutions",
"documentation": "Reference link (for docs, github, etc.); e.g. https://link-to-docs.com"
}
"documentation": "Reference link (for docs, github, etc.); e.g. https://link-to-docs.com",
"description": "Project description"
}
19 changes: 17 additions & 2 deletions implementations/_template_library_/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{
"fullName": "Full library name; if left blank the implementation folder name will be used",
"language": "Programming language and/or runtime",
"documentation": "Reference link (for docs, github, etc.); e.g. https://link-to-docs.com"
}
"documentation": "Reference link (for docs, github, etc.); e.g. https://link-to-docs.com",
"description": "OPTIONAL custom description, if field is omitted description will be pulled from Github repo",
"type": "SDL first and/or Code first",
"repository": {
"name": "<github_repo_name>",
"owner": "<github_org_name>",
"link": "https://github.com/<github_org_name>/<github_repo_name>"
},
"coreLibrary": {
"name": "<display name of core GraphQL library - ONLY INCLUDE THIS SECTION IF DIFFERENT THAN THE MAIN LIBRARY REPO>",
"link": "github repo | NPM link | other distribution link"
},
"federationlibrary": {
"name": "<display name of Federation library - ONLY INCLUDE THIS SECTION IF DIFFERENT THAN THE MAIN LIBRARY REPO>",
"link": "github repo | NPM link | other distribution link"
}
}
5 changes: 5 additions & 0 deletions implementations/absinthe-federation/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "The GraphQL toolkit for Elixir",
"stargazerCount": 4084,
"lastRelease": "2021-09-28T21:41:45Z"
}
16 changes: 13 additions & 3 deletions implementations/absinthe-federation/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"fullName": "Absinthe.Federation",
"fullName": "Absinthe",
"language": "Elixir",
"documentation": "https://github.com/DivvyPayHQ/absinthe_federation"
}
"documentation": "https://hexdocs.pm/absinthe_federation/readme.html",
"type": "Code first",
"repository": {
"name": "absinthe",
"owner": "absinthe-graphql",
"link": "https://github.com/absinthe-graphql/absinthe"
},
"federationlibrary": {
"name": "Absinthe.Federation",
"link": "https://github.com/DivvyPayHQ/absinthe_federation"
}
}
5 changes: 5 additions & 0 deletions implementations/apollo-server/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.",
"stargazerCount": 13220,
"lastRelease": "2023-02-15T19:18:10Z"
}
18 changes: 16 additions & 2 deletions implementations/apollo-server/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"fullName": "Apollo Server",
"language": "JavaScript / TypeScript",
"documentation": "https://www.apollographql.com/docs/federation/"
}
"documentation": "https://www.apollographql.com/docs/federation/",
"type": "SDL first",
"repository": {
"name": "apollo-server",
"owner": "apollographql",
"link": "https://github.com/apollographql/apollo-server"
},
"coreLibrary": {
"name": "GraphQL.js",
"link": "https://www.npmjs.com/package/graphql"
},
"federationlibrary": {
"name": "Apollo Subgraph",
"link": "https://www.npmjs.com/package/@apollo/subgraph"
}
}
1 change: 1 addition & 0 deletions implementations/appsync/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 3 additions & 2 deletions implementations/appsync/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullName": "AWS AppSync",
"language": "Other Solutions",
"documentation": "https://aws.amazon.com/appsync/"
}
"documentation": "https://aws.amazon.com/appsync/",
"description": "Serverless GraphQL and Pub/Sub APIs"
}
5 changes: 5 additions & 0 deletions implementations/ariadne/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Python library for implementing GraphQL servers using schema-first approach.",
"stargazerCount": 1962,
"lastRelease": "2023-02-22T11:33:08Z"
}
14 changes: 12 additions & 2 deletions implementations/ariadne/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"fullName": "Ariadne",
"language": "Python",
"documentation": "https://ariadnegraphql.org/docs/apollo-federation"
}
"documentation": "https://ariadnegraphql.org/docs/apollo-federation",
"type": "SDL first",
"repository": {
"name": "ariadne",
"owner": "mirumee",
"link": "https://github.com/mirumee/ariadne"
},
"coreLibrary": {
"name": "GraphQL-core 3",
"link": "https://github.com/graphql-python/graphql-core"
}
}
5 changes: 5 additions & 0 deletions implementations/async-graphql/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "A GraphQL server library implemented in Rust",
"stargazerCount": 2721,
"lastRelease": "2022-11-28T06:30:57Z"
}
12 changes: 9 additions & 3 deletions implementations/async-graphql/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"fullName": "Async-graphql",
"fullName": "async-graphql",
"language": "Rust",
"documentation": "https://async-graphql.github.io/async-graphql/en/apollo_federation.html"
}
"documentation": "https://async-graphql.github.io/async-graphql/en/apollo_federation.html",
"type": "Code first",
"repository": {
"name": "async-graphql",
"owner": "async-graphql",
"link": "https://github.com/async-graphql/async-graphql"
}
}
5 changes: 5 additions & 0 deletions implementations/caliban/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Functional GraphQL library for Scala",
"stargazerCount": 853,
"lastRelease": "2022-12-19T05:28:42Z"
}
10 changes: 8 additions & 2 deletions implementations/caliban/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"fullName": "Caliban",
"language": "Scala",
"documentation": "https://ghostdogpr.github.io/caliban/docs/federation.html"
}
"documentation": "https://ghostdogpr.github.io/caliban/docs/federation.html",
"type": "SDL first",
"repository": {
"name": "caliban",
"owner": "ghostdogpr",
"link": "https://github.com/ghostdogpr/caliban"
}
}
1 change: 1 addition & 0 deletions implementations/dgraph/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 3 additions & 2 deletions implementations/dgraph/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullName": "Dgraph",
"language": "Other Solutions",
"documentation": "https://dgraph.io/docs/graphql/overview/"
}
"documentation": "https://dgraph.io/docs/graphql/",
"description": "Dgraph is the native GraphQL database with a graph backend. It is open-source, scalable, distributed, highly available and lightning fast."
}
5 changes: 5 additions & 0 deletions implementations/dgs/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "GraphQL for Java with Spring Boot made easy.",
"stargazerCount": 2578,
"lastRelease": "2023-02-17T16:54:37Z"
}
18 changes: 16 additions & 2 deletions implementations/dgs/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"fullName": "dgs-framework",
"language": "Java / Kotlin",
"documentation": "https://github.com/netflix/dgs-framework/"
}
"documentation": "https://netflix.github.io/dgs/federation/",
"type": "SDL first",
"repository": {
"name": "dgs-framework",
"owner": "netflix",
"link": "https://github.com/netflix/dgs-framework/"
},
"coreLibrary": {
"name": "GraphQL Java",
"link": "https://github.com/graphql-java/graphql-java"
},
"federationlibrary": {
"name": "Federation JVM",
"link": "https://github.com/apollographql/federation-jvm"
}
}
5 changes: 5 additions & 0 deletions implementations/express-graphql/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "Create a GraphQL HTTP server with Express.",
"stargazerCount": 6387,
"lastRelease": "2020-11-19T15:10:40Z"
}
18 changes: 16 additions & 2 deletions implementations/express-graphql/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"fullName": "express-graphql",
"language": "JavaScript / TypeScript",
"documentation": "https://github.com/graphql/express-graphql"
}
"documentation": "https://github.com/graphql/express-graphql",
"type": "SDL first",
"repository": {
"name": "express-graphql",
"owner": "graphql",
"link": "https://github.com/graphql/express-graphql"
},
"coreLibrary": {
"name": "GraphQL.js",
"link": "https://www.npmjs.com/package/graphql"
},
"federationlibrary": {
"name": "Apollo Subgraph",
"link": "https://www.npmjs.com/package/@apollo/subgraph"
}
}
5 changes: 0 additions & 5 deletions implementations/federation-jvm/metadata.json

This file was deleted.

5 changes: 5 additions & 0 deletions implementations/gqlgen/github_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"description": "go generate based graphql server library",
"stargazerCount": 8673,
"lastRelease": "2023-01-23T15:41:41Z"
}
Loading