Documentation
¶
Index ¶
- func Auth(ctx context.Context, obj any, next graphql.Resolver) (any, error)
- func CacheData(ctx context.Context, obj any, next graphql.Resolver, ttl int, keyTmp *string, ...) (res any, err error)
- func HasPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
- func SkipNoPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheData ¶ added in v0.3.0
func CacheData(ctx context.Context, obj any, next graphql.Resolver, ttl int, keyTmp *string, fields []string) (res any, err error)
CacheData is a GraphQL directive that caches the result of a field/method for a specified time to live (ttl) in seconds.
func HasPermissions ¶
func HasPermissions(ctx context.Context, obj any, next graphql.Resolver, perms []string) (any, error)
HasPermissions for this user to the particular permission of the object Every module have the list of permissions ["list", "view", "create", "update", "delete", etc] This method checks, first of all, that object belongs to the user or have manager access and secondly that the user has the requested permissions of the module or several modules
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.