{"id":13700851,"url":"https://github.com/omar-dulaimi/graphql-shield-generator","last_synced_at":"2025-04-10T21:11:40.304Z","repository":{"id":65145543,"uuid":"583743367","full_name":"omar-dulaimi/graphql-shield-generator","owner":"omar-dulaimi","description":"Emits a GraphQL Shield from your GraphQL schema","archived":false,"fork":false,"pushed_at":"2024-05-27T12:17:36.000Z","size":37,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T21:11:36.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/omar-dulaimi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"omar-dulaimi","custom":["https://www.buymeacoffee.com/omardulaimi"]}},"created_at":"2022-12-30T19:11:19.000Z","updated_at":"2024-03-22T22:27:34.000Z","dependencies_parsed_at":"2024-11-18T07:13:41.319Z","dependency_job_id":null,"html_url":"https://github.com/omar-dulaimi/graphql-shield-generator","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":"0.14814814814814814","last_synced_commit":"d4c8f4abd84b42b5aeaa06b379f21ae89dfb81b8"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-dulaimi%2Fgraphql-shield-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-dulaimi%2Fgraphql-shield-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-dulaimi%2Fgraphql-shield-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omar-dulaimi%2Fgraphql-shield-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omar-dulaimi","download_url":"https://codeload.github.com/omar-dulaimi/graphql-shield-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298317,"owners_count":21080320,"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-08-02T20:01:03.336Z","updated_at":"2025-04-10T21:11:40.288Z","avatar_url":"https://github.com/omar-dulaimi.png","language":"TypeScript","funding_links":["https://github.com/sponsors/omar-dulaimi","https://www.buymeacoffee.com/omardulaimi"],"categories":["Implementations","TypeScript"],"sub_categories":["JavaScript/TypeScript"],"readme":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eGraphql Shield Generator\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/omar-dulaimi/graphql-shield-generator\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/omar-dulaimi/graphql-shield-generator/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/omar-dulaimi/graphql-shield-generator/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/omardulaimi\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#overview\"\u003eOverview\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## Overview\n\nAutomatically generate a GraphQL Shield from your GraphQL Schema(or type definitions and resolvers).\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Installation\n\n#### Using npm\n\n```sh\nnpm install graphql-shield-generator\n```\n\n#### Using yarn\n\n```sh\nyarn add graphql-shield-generator\n```\n\n## Usage\n\n- Don't forget to star this repo 😉\n\n```ts\nimport { generateGraphqlShield } from 'graphql-shield-generator';\n\nawait generateGraphqlShield({\n  schema,\n  options: {\n    outputDir: './permissions',\n    fileName: 'shield',\n    extension: 'js',\n    moduleSystem: \"CommonJS\"\n  },\n});\n\n// or\n\nawait generateGraphqlShield({\n  schema: { typeDefs, resolvers },\n  options: {\n    outputDir: './permissions',\n    fileName: 'shield',\n    extension: 'ts',\n    moduleSystem: \"ES modules\"\n  },\n});\n```\n\n## Documentation\n\n### `generateGraphqlShield(schema | { typeDefs, resolvers }, options)`\n\n\u003e Generates a GraphQL Shield.\n\n#### `options`\n\n| Property     | Required | Default           | Description                             |\n| ------------ | -------- | ----------------- | --------------------------------------- |\n| outputDir    | false    | current directory | Directory that shield will be placed in |\n| fileName     | false    | 'shield'          | File name of the generated shield       |\n| extension    | false    | 'js'              | File extension of the generated shield  |\n| moduleSystem | false    | 'CommonJS'        | Module system of the generated shield   |\n\n## Contributing\n\nWe are always looking for people to help us grow `graphql-shield-generator`! If you have an issue, feature request, or pull request, let us know!\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/omar-dulaimi/graphql-shield-generator.svg?style=for-the-badge\n[contributors-url]: https://github.com/omar-dulaimi/graphql-shield-generator/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/omar-dulaimi/graphql-shield-generator.svg?style=for-the-badge\n[forks-url]: https://github.com/omar-dulaimi/graphql-shield-generator/network/members\n[stars-shield]: https://img.shields.io/github/stars/omar-dulaimi/graphql-shield-generator.svg?style=for-the-badge\n[stars-url]: https://github.com/omar-dulaimi/graphql-shield-generator/stargazers\n[issues-shield]: https://img.shields.io/github/issues/omar-dulaimi/graphql-shield-generator.svg?style=for-the-badge\n[issues-url]: https://github.com/omar-dulaimi/graphql-shield-generator/issues\n[license-shield]: https://img.shields.io/github/license/omar-dulaimi/graphql-shield-generator?style=for-the-badge\n[license-url]: https://github.com/omar-dulaimi/graphql-shield-generator/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomar-dulaimi%2Fgraphql-shield-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomar-dulaimi%2Fgraphql-shield-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomar-dulaimi%2Fgraphql-shield-generator/lists"}