{"id":19298258,"url":"https://github.com/casbin/graphql-authz","last_synced_at":"2025-04-22T09:32:23.200Z","repository":{"id":49246978,"uuid":"378444192","full_name":"casbin/graphql-authz","owner":"casbin","description":"graphql-authz is an authorization middleware for graphql-go","archived":false,"fork":false,"pushed_at":"2021-07-10T07:54:04.000Z","size":14,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T12:34:14.260Z","etag":null,"topics":["abac","acl","authorization","casbin","graphql","middleware","plugin","rbac"],"latest_commit_sha":null,"homepage":"https://github.com/graphql-go/graphql","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casbin.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}},"created_at":"2021-06-19T15:26:35.000Z","updated_at":"2024-06-24T07:01:40.000Z","dependencies_parsed_at":"2022-09-12T18:50:47.174Z","dependency_job_id":null,"html_url":"https://github.com/casbin/graphql-authz","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fgraphql-authz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fgraphql-authz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fgraphql-authz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casbin%2Fgraphql-authz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casbin","download_url":"https://codeload.github.com/casbin/graphql-authz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246718451,"owners_count":20822569,"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":["abac","acl","authorization","casbin","graphql","middleware","plugin","rbac"],"created_at":"2024-11-09T23:07:25.081Z","updated_at":"2025-04-22T09:32:23.161Z","avatar_url":"https://github.com/casbin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-authz\n\n[![Coverage Status](https://coveralls.io/repos/github/casbin/graphql-authz/badge.svg?branch=master)](https://coveralls.io/github/casbin/graphql-authz?branch=master)\n[![Go](https://github.com/casbin/graphql-authz/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/graphql-authz/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/release/casbin/graphql-authz.svg)](https://github.com/casbin/graphql-authz/releases/latest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/casbin/graphql-authz)](https://goreportcard.com/report/github.com/casbin/graphql-authz)\n\ngraphql-authz is a casbin binding of graphql, something like restful api. There're actions, like `enforce`, `getPolicies`, `addPolicy`, `removePolicy`, `updatePolicy`.\n\n## Install\n\n```bash\ngo get -u github.com/casbin/graphql-authz\n```\n\n## Usage\n\nEnforce Example:\n\n```go\ne, _ := casbin.NewEnforcer(\"./examples/model.conf\", \"./examples/policy.csv\")\nschema := authz.InitType(e)\nresult := authz.Execute(`{enforce(sub:\"alice\" obj:\"data1\" act:\"read\"){sub obj act ok}}`, schema)\n```\n\nMore info, please refer to [graphql](https://github.com/graphql/graphql-js) and [basic usage](./authz_test.go)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fgraphql-authz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasbin%2Fgraphql-authz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasbin%2Fgraphql-authz/lists"}