{"id":19412969,"url":"https://github.com/dielduarte/schema-diff-bot","last_synced_at":"2025-07-27T19:03:19.620Z","repository":{"id":44116766,"uuid":"175115128","full_name":"dielduarte/schema-diff-bot","owner":"dielduarte","description":"A simple slack bot to send the differences between graphql schemas","archived":false,"fork":false,"pushed_at":"2022-02-12T07:17:59.000Z","size":271,"stargazers_count":15,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T11:38:51.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dielduarte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-12T01:55:10.000Z","updated_at":"2023-03-08T04:33:10.000Z","dependencies_parsed_at":"2022-07-22T19:49:07.174Z","dependency_job_id":null,"html_url":"https://github.com/dielduarte/schema-diff-bot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dielduarte/schema-diff-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fschema-diff-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fschema-diff-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fschema-diff-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fschema-diff-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dielduarte","download_url":"https://codeload.github.com/dielduarte/schema-diff-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fschema-diff-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263585897,"owners_count":23484488,"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":[],"created_at":"2024-11-10T12:29:35.925Z","updated_at":"2025-07-04T17:10:46.063Z","avatar_url":"https://github.com/dielduarte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Schema diff bot\n\nA simple slack bot to send the differences between graphql schemas\n\n# How to use\n\n- install the lib globally or local and be free to configure how to call the bot.\n\n`npm install [-g] schema-diff-bot`\n\nMy suggestion is to call the bot using git hook before push new code to the remote repository. I would suggest the usage of [Husky](https://github.com/typicode/husky) to configure git hooks using npm scripts in an easy way.\n\n# config file\n\nschema diff bot uses `cosmiconfig` so, you can create the config file using:\n\n- a package.json property\n- a JSON or YAML, extensionless \"rc file\"\n- an \"rc file\" with the extensions .json, .yaml, .yml, or .js.\n- a .config.js CommonJS module\n\nour module is called  `schemaDiffBot` so, you can create:\n\n- a `schemaDiffBot` property in package.json\n- a `.schemaDiffBotrc` file in JSON or YAML format\n- a `.schemaDiffBotrc.json` file\n- a `.schemaDiffBotrc.yaml`, `.schemaDiffBotrc.yml`, or `.schemaDiffBotrc.js` file\n- a `schemaDiffBot.config.js` file exporting a JS object\n\n# config options\n\n```\n{\n  leftSchema: \"path to file or url to graphql schema\",\n  rightSchema: \"path to file or url to graphql schema\",\n  options: {\n    //headers to be applied in both schemas\n    headers: {\n      authorization: \"Bearer token\",\n    },\n    //headers to be applied on leftSchema\n    leftSchema: {\n      headers: {}\n    },\n    //headers to applied on rightSchema\n    rightSchema: {\n      headers: {}\n    }\n  },\n  slack: {\n    //you should create an slack app e get the token to use web client API\n    token: \"token\",\n    //you also should provide channelId\n    channelId: \"CGU94K7S8\"\n  },\n  icons: {\n    //you can change default icons per type of action\n    //the actions covered are:\n\n    changed: \":exclamation:\",\n    removed: \":fire:\",\n    added: \":white_check_mark:\"\n  },\n  // if true, when has differences the process will stop, useful to run in CI process\n  stopProcessIfHasDifferences: \"false\"\n}\n```\n\nExample of message received:\n\n![](docs/example.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fschema-diff-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdielduarte%2Fschema-diff-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fschema-diff-bot/lists"}