Skip to content

Tag ​

Type
Class
Namespace
craft\gql\resolvers\elements
Inherits
craft\gql\resolvers\elements\Tag » craft\gql\base\ElementResolver » craft\gql\base\Resolver
Since
3.3.0

Class Tag

View source

Protected Properties ​

PropertyDescription
eagerLoadableFieldsByContextarray – Cache fields by context.

Public Methods ​

MethodDescription
getArrayableArguments()Returns a list of all the arguments that can be accepted as arrays.
prepareArguments()Prepare arguments for use, converting to array where applicable.
prepareQuery()Prepare an element Query based on the source, arguments and the field name on the source.
resolve()Resolve a field to its value.
resolveCount()Resolve an element query to a total count of elements.
resolveOne()Resolve an element query to a single result.

prepareQuery() ​

Prepare an element Query based on the source, arguments and the field name on the source.

View source

Arguments ​

  • $source (mixed) – The source. Null if top-level field being resolved.
  • $arguments (array) – Arguments to apply to the query.
  • $fieldName (null) – Field name to resolve on the source, if not a top-level resolution.

Returns ​

mixed

Protected Methods ​

MethodDescription
extractEagerLoadCondition()Extract eager load conditions for a given resolve information. Preferably at the very top of the query.
prepareElementQuery()Prepare an element query for given resolution argument set.