Resolver
- Type
- Abstract Class
- Namespace
- craft\gql\base
- Inherits
- craft\gql\base\Resolver
- Extended by
- craft\gql\base\ElementResolver, craft\gql\resolvers\OptionField, craft\gql\resolvers\elements\Asset, craft\gql\resolvers\elements\Category, craft\gql\resolvers\elements\Entry, craft\gql\resolvers\elements\GlobalSet, craft\gql\resolvers\elements\MatrixBlock, craft\gql\resolvers\elements\Tag, craft\gql\resolvers\elements\User
- Since
- 3.3.0
Class Resolver
View source (opens new window)
# Protected Properties
Property | Description |
---|---|
eagerLoadableFieldsByContext | array (opens new window) – Cache fields by context. |
# eagerLoadableFieldsByContext
- Type
- array (opens new window)
- Default value
null
Cache fields by context.
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getArrayableArguments() | Returns a list of all the arguments that can be accepted as arrays. |
prepareArguments() | Prepare arguments for use, converting to array where applicable. |
resolve() | Resolve a field to its value. |
# getArrayableArguments()
DEPRECATED
Deprecated in 3.6. Any argument modifications should be performed using argument handlers.
Returns a list of all the arguments that can be accepted as arrays.
View source (opens new window)
Returns
# prepareArguments()
DEPRECATED
Deprecated in 3.6. Any argument modifications should be performed using argument handlers.
Prepare arguments for use, converting to array where applicable.
View source (opens new window)
Arguments
$arguments
(array (opens new window))
Returns
# resolve()
Resolve a field to its value.
View source (opens new window)
Arguments
$source
(mixed
) – The parent data source to use for resolving this field$arguments
(array (opens new window)) – Arguments for resolving this field.$context
(mixed
) – The context shared between all resolvers$resolveInfo
(\GraphQL\Type\Definition\ResolveInfo
) – The resolve information
# Protected Methods
Method | Description |
---|---|
extractEagerLoadCondition() | Extract eager load conditions for a given resolve information. Preferably at the very top of the query. |
# extractEagerLoadCondition()
DEPRECATED
Deprecated as of Craft 3.5.0.
Extract eager load conditions for a given resolve information. Preferably at the very top of the query.
View source (opens new window)
Arguments
$resolveInfo