{"id":18687342,"url":"https://github.com/junosuarez/graphql-schema-version","last_synced_at":"2026-03-03T18:32:22.716Z","repository":{"id":46222041,"uuid":"68970897","full_name":"junosuarez/graphql-schema-version","owner":"junosuarez","description":"derive a semver version number from a graphql schema","archived":false,"fork":false,"pushed_at":"2021-11-05T17:28:15.000Z","size":18,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T23:27:46.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junosuarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-22T23:37:55.000Z","updated_at":"2021-11-06T09:30:58.000Z","dependencies_parsed_at":"2022-09-16T09:22:25.518Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/graphql-schema-version","commit_stats":null,"previous_names":["jsdnxx/graphql-schema-version"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/junosuarez/graphql-schema-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fgraphql-schema-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fgraphql-schema-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fgraphql-schema-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fgraphql-schema-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/graphql-schema-version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fgraphql-schema-version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30054601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-07T10:32:30.703Z","updated_at":"2026-03-03T18:32:22.678Z","avatar_url":"https://github.com/junosuarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-schema-version\nderive a semver version number from a graphql schema\n\n[![Build Status](https://travis-ci.org/jsdnxx/graphql-schema-version.svg?branch=master)](https://travis-ci.org/jsdnxx/graphql-schema-version)\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n\n## usage\n```js\nconst graphqlSchemaVersion = require('graphql-schema-version')\n\nconst newSchema = require('./newClientSchema.json')\nconst oldSchema = require('./oldClientSchema.json')\nconst oldVersion = '2.3.0'\nconsole.log(graphqlSchemaVersion(newSchema, oldSchema, oldVersion))\n```\nprints a semver for the relation, e.g. `2.4.0` for a minor version increment or `3.0.0` for major.\n\nthe schema documents it takes as arguments are the JSON documents generated from the client introspection query - see http://graphql.org/graphql-js/utilities/#printintrospectionschema\n\n### Spec\n    graphql-schema-version\n    ✓ returns oldVersion if no old schema is supplied\n    ✓ defaults to `1.0.0` if oldVersion is not supplied\n    ✓ increments patch version if field is deprecated\n    ✓ increments minor version if enum type is added\n    ✓ increments minor version if enum value is added\n    ✓ increments minor version if type is added\n    ✓ increments major version if type is deleted\n    ✓ increments minor version if field is added\n    ✓ increments major version if field is deleted\n    ✓ increments major version if field type changed\n    ✓ increments minor version if field argument added\n    ✓ increments major version if field argument deleted\n    ✓ increments major version if field argument type changed\n    ✓ increments patch version if directive is added\n    ✓ increments major version if directive is deleted\n    ✓ increments major version if enum type is deleted\n    ✓ increments major version if enum value is deleted\n    ✓ increments minor version if field type changes from non-nullable to nullable of the same inner type\n\n\n## installation\n\n    $ npm install graphql-schema-version\n\n\n## running the tests\n\nFrom package root:\n\n    $ npm install\n    $ npm test\n\n\n## contributors\n\n- jason@denizac.org\n\n\n## todo\n- [ ] rewrite with proper visitor pattern for maintainability\n\n\n## license\n\nISC. (c) MMXVI jason@denizac.org. See LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fgraphql-schema-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Fgraphql-schema-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fgraphql-schema-version/lists"}