{"id":14976126,"url":"https://github.com/fabsrc/graphql-schema-diff","last_synced_at":"2025-04-04T08:03:07.193Z","repository":{"id":34122061,"uuid":"169482393","full_name":"fabsrc/graphql-schema-diff","owner":"fabsrc","description":":page_facing_up::arrows_counterclockwise::page_facing_up: Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.","archived":false,"fork":false,"pushed_at":"2024-11-18T20:54:01.000Z","size":1281,"stargazers_count":69,"open_issues_count":7,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T07:02:03.708Z","etag":null,"topics":["breaking-changes","dangerous-changes","diff","graphql","graphql-schema","hacktoberfest","schema"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/fabsrc.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":"2019-02-06T21:52:22.000Z","updated_at":"2025-03-17T13:44:21.000Z","dependencies_parsed_at":"2022-08-08T00:01:13.555Z","dependency_job_id":"b0f160cd-da0a-437d-9840-09212eaa16c2","html_url":"https://github.com/fabsrc/graphql-schema-diff","commit_stats":{"total_commits":146,"total_committers":7,"mean_commits":"20.857142857142858","dds":0.2534246575342466,"last_synced_commit":"7e4d620e0190469678431a0c8f297c78a520b60d"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsrc%2Fgraphql-schema-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsrc%2Fgraphql-schema-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsrc%2Fgraphql-schema-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabsrc%2Fgraphql-schema-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabsrc","download_url":"https://codeload.github.com/fabsrc/graphql-schema-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247136079,"owners_count":20889586,"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":["breaking-changes","dangerous-changes","diff","graphql","graphql-schema","hacktoberfest","schema"],"created_at":"2024-09-24T13:53:21.415Z","updated_at":"2025-04-04T08:03:07.166Z","avatar_url":"https://github.com/fabsrc.png","language":"TypeScript","readme":"# GraphQL Schema Diff\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/fabsrc/graphql-schema-diff/main.yml?branch=master\u0026style=flat-square)](https://github.com/fabsrc/graphql-schema-diff/actions/workflows/main.yml)\n[![npm](https://img.shields.io/npm/v/graphql-schema-diff.svg?style=flat-square)](https://www.npmjs.com/package/graphql-schema-diff)\n\nReturns the diff of two GraphQL schemas. Detects dangerous and breaking changes.\n\n## Install\n\n```sh\n$ npm install -g graphql-schema-diff\n```\n\n## Usage\n\n```sh\n$ graphql-schema-diff --help\n\n  Returns the diff of two GraphQL schemas. Detects dangerous and breaking changes.\n\n  Usage\n    $ graphql-schema-diff \u003cleftSchemaLocation\u003e \u003crightSchemaLocation\u003e\n\n  Options\n    --fail-on-dangerous-changes  Exit with error on dangerous changes\n    --fail-on-breaking-changes   Exit with error on breaking changes\n    --fail-on-all-changes        Exit with error on all changes\n    --create-html-output         Creates an HTML file containing the diff\n    --html-output-directory      Directory where the HTML file should be stored (Default: './schemaDiff')\n    --header, -H                 Header to send to all remote schema sources\n    --left-schema-header         Header to send to left remote schema source\n    --right-schema-header        Header to send to right remote schema source\n    --sort-schema, -s            Sort schemas prior to diffing\n    --input-value-deprecation    Include deprecated input value fields when loading from URL\n\n  Examples\n    $ graphql-schema-diff https://example.com/graphql schema.graphql\n    $ graphql-schema-diff https://example.com/graphql schema.graphql -H 'Authorization: Bearer 123'\n\n```\n\nSchema locations can be:\n\n* An URL to a GraphQL endpoint (e.g. `https://swapi.graph.cool/`)\n* A path to a single file (e.g. `schemas/schema.graphql`)\n* A glob pattern to merge multiple files (e.g. `'schemas/**/*.graphql'`)\n\n\n## API\n\n### Example\n\n```js\nimport { getDiff } from 'graphql-schema-diff';\n\nconst currentSchemaLocation = 'https://swapi-graphql.netlify.app/.netlify/functions/index';\nconst newSchemaLocation = './schema.graphql';\n\ngetDiff(currentSchemaLocation, newSchemaLocation)\n  .then((result) =\u003e {\n    if (!result) {\n      console.log('Schemas are identical!');\n      return;\n    }\n\n    console.log(result.diff);\n    console.log(result.diffNoColor);\n    console.log(result.dangerousChanges);\n    console.log(result.breakingChanges);\n  });\n```\n\n\n## Related Packages\n\n* [GraphQL Inspector](https://github.com/kamilkisiela/graphql-inspector) ouputs a list of changes between two GraphQL schemas.\n* [GraphQL Tools](https://github.com/ardatan/graphql-tools) provides a set of utils for faster development of GraphQL tools.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabsrc%2Fgraphql-schema-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabsrc%2Fgraphql-schema-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabsrc%2Fgraphql-schema-diff/lists"}