pfSense-pkg-RESTAPI

Resolver
in package

Defines a class that maps/resolves GraphQL queries and mutations to the appropriate Model methods.

Table of Contents

Properties

$model  : Model

Methods

__construct()  : mixed
Constructs the GraphQLResolver object with a given Model object.
check_privs()  : void
Checks if authenticated user has privileges to perform the requested action.
create()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'create' method.
delete()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'delete' method.
delete_all()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'delete_all' method.
delete_many()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'delete_many' method.
query()  : array<string|int, mixed>
A resolver that maps a GraphQL query to the Model's 'query' method.
read()  : array<string|int, mixed>
A resolver that maps a GraphQL query to the Model's 'read' method.
replace_all()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'replace_all' method.
update()  : array<string|int, mixed>
A resolver that maps a GraphQL mutation to the Model's 'update' method.

Properties

Methods

__construct()

Constructs the GraphQLResolver object with a given Model object.

public __construct(Model $model) : mixed
Parameters
$model : Model

The Model object to be used for resolving queries and mutations.

check_privs()

Checks if authenticated user has privileges to perform the requested action.

public check_privs(string $resolver, Auth $auth) : void
Parameters
$resolver : string

The resolver method to check permissions for.

$auth : Auth

The Auth object to use for checking permissions.

Tags
throws
ForbiddenError

If the user does not have the required privileges.


        
On this page

Search results