Skip to content

Commit

Permalink
Update README.md [skip-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Stradivario authored Oct 24, 2024
1 parent 3d0c6f1 commit dcecb63
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/ac/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
The @gapi/ac library is an access control utility designed for use in GraphQL applications. It helps developers manage permissions for different user roles, such as GUEST, USER, and ADMIN, across various GraphQL actions like queries, mutations, subscriptions, and events. It allows developers to define and enforce rules for which roles can access or manipulate specific resources in the system.

Key features include:

Role-based permissions: You can define access control based on user roles (like GUEST, USER, ADMIN) and control what actions they can perform.
GraphQL-focused: Specifically built to handle permissioning in GraphQL, making it a natural fit for applications using this API standard.
Filtering data: The library allows filtering data based on user roles, so different roles see only the data they are authorized to access.
For example, an admin might have access to query a certain data field (status), while a regular user might have partial access, where some attributes of the response are filtered out based on the permission definitions.

```ts
import { AccessControl, Union } from '@gapi/ac';

Expand Down

0 comments on commit dcecb63

Please sign in to comment.