Skip to content

Site ​

Type
Class
Namespace
craft\gql\types
Inherits
craft\gql\types\Site » craft\gql\base\ObjectType » GraphQL\Type\Definition\ObjectType
Implements
craft\gql\base\SingularTypeInterface
Since
5.12.0

Class Site

View source

Public Methods ​

MethodDescription
__construct()
getFieldDefinitions()Returns the type’s field definitions.
getName()Return the name of the GraphQL type.
getType()Return an instance of the GraphQL type.
resolveWithDirectives()Resolve a value with the directives that apply to it.

getFieldDefinitions() ​

Returns the type’s field definitions.

View source

Returns ​

array

getName() ​

Return the name of the GraphQL type.

View source

Returns ​

string

getType() ​

Return an instance of the GraphQL type.

View source

Returns ​

\GraphQL\Type\Definition\Type

Protected Methods ​

MethodDescription
resolve()Resolve a field value with arguments, context and resolve information.

resolve() ​

Resolve a field value with arguments, context and resolve information.

View source

Arguments ​

  • $source (mixed) – The parent data source to use for resolving this field
  • $arguments (array) – Arguments for resolving this field.
  • $context (mixed) – The context shared between all resolvers
  • $resolveInfo (\GraphQL\Type\Definition\ResolveInfo) – The resolve information

Returns ​

mixed – $result