Access pipes
The main reason why we use access pipes is to have control over which parts of the schema are available to individual groups of schema consumers. By doing this, we can see how access control will work in our system even during the graph creation phase.
To understand access pipes, we need to understand Role-Based Access Control (RBAC). RBAC is a mechanism that allows us to control access to data based on user roles. It works by assigning each user a role, which determines the resources available to them. In practice, when defining a GraphQL schema, we can specify roles for individual object types and fields. We can define different roles such as admin, user, or guest, and assign them specific read and write permissions for data using directives or we can do it with access pipes. When a user sends a GraphQL query, their role is taken into account during query execution. The GraphQL backend engine checks whether the user has the necessary permissions to resolve the specific...