{"id":16711646,"url":"https://github.com/agu-z/gql-diff-action","last_synced_at":"2025-10-09T03:17:04.154Z","repository":{"id":61653914,"uuid":"323490447","full_name":"agu-z/gql-diff-action","owner":"agu-z","description":"A neat summary of the changes you made to your GraphQL schema. Right on your PR.","archived":false,"fork":false,"pushed_at":"2024-06-05T16:53:32.000Z","size":25637,"stargazers_count":7,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T00:12:40.467Z","etag":null,"topics":["actions","diff","graphql","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agu-z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T01:37:03.000Z","updated_at":"2024-07-10T17:49:13.000Z","dependencies_parsed_at":"2024-10-28T11:43:34.844Z","dependency_job_id":null,"html_url":"https://github.com/agu-z/gql-diff-action","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agu-z%2Fgql-diff-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agu-z%2Fgql-diff-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agu-z%2Fgql-diff-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agu-z%2Fgql-diff-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agu-z","download_url":"https://codeload.github.com/agu-z/gql-diff-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244866261,"owners_count":20523488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","diff","graphql","pull-requests"],"created_at":"2024-10-12T20:12:47.191Z","updated_at":"2025-10-09T03:16:59.107Z","avatar_url":"https://github.com/agu-z.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gql-diff-action\n\nA neat summary of the changes you made to your GraphQL schema:\n\n![summary screenshot](./summary.jpg)\n\nSee [Example Usage](#example-usage) for generated schemas.\n\n## Inputs\n\n### `token`\n\nA GitHub token used to post a comment to your PR.\n\n``${{ secrets.GITHUB_TOKEN }}`` works here.\n\n### `old-schema`\n\nThe schema before the change. This can be a GraphQL SDL file or an endpoint URL.\n\n### `new-schema`\n\nThe schema after the change. This can be a GraphQL SDL file or an endpoint URL.\n\n### `header` (optional)\n\nA string to use as the header of the PR comment. Use this if you want to generate summaries for multiple schemas in the same PR.\n\n## Example usage\n\n```yaml\nuses: agu-z/gql-diff-action@v2\nwith:\n  token: '${{ secrets.GITHUB_TOKEN }}'\n  old-schema: '~/old-schema.gql'\n  new-schema: '~/new-schema.gql'\n```\n\nThe way you generate old and new schema files is up to you. \n\n\nThe following example generates both schemas by running the server before and after the PR change:\n\n```yaml\nname: GraphQL diff\n\non: pull_request\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      \n      - uses: actions/setup-node@v1\n        with:\n          node-version: 12.x\n        \n      - name: Generate new schema\n        run: |\n          npm install       # Install dependencies\n          npm start \u0026       # Start your server in the background\n          SERVER_PID=$!     # Store server pid in order to stop it afterwards\n          \n          # Generate the new schema\n          npx get-graphql-schema http://localhost:5000 ~/new-schema.gql\n          \n          kill $SERVER_PID  # Stop server. This is necessary to free up the port.\n           \n      - name: Check out PR base ref\n        run: |\n          git checkout ${{ github.event.pull_request.base.sha }}\n         \n      - name: Generate old schema\n        run: |\n          npm install       # Install dependencies\n          npm start \u0026       # Start your server in the background\n          SERVER_PID=$!     # Store server pid in order to stop it afterwards\n\n          # Generate the old schema\n          npx get-graphql-schema http://localhost:5000 ~/old-schema.gql\n\n          kill $SERVER_PID  # Stop server\n          \n      - uses: agu-z/gql-diff-action@v2\n        with:\n          token: '${{ secrets.GITHUB_TOKEN }}'\n          old-schema: '~/old-schema.gql'\n          new-schema: '~/new-schema.gql'\n\n```\n\nThis is an example for an API written in Node but the same idea works for any language or framework as long as you can start the server in your workflow.\n \n__\n\nThis action uses [`graphql-schema-diff`](https://github.com/fabsrc/graphql-schema-diff). Thanks [fabsrc](https://github.com/fabsrc)!\n\nAgus Zubiaga 2022\n\nMIT licensed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagu-z%2Fgql-diff-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagu-z%2Fgql-diff-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagu-z%2Fgql-diff-action/lists"}