Gql
- Type
- Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\Gql
- Since
- 3.3.0
Class Gql
# Public Methods
Method | Description |
---|---|
applyDirectives() | Apply directives (if any) to a resolved value according to source and resolve info. |
canMutateAssets() | Return true if active schema can mutate assets. |
canMutateCategories() | Return true if active schema can mutate categories. |
canMutateEntries() | Return true if active schema can mutate entries. |
canMutateGlobalSets() | Return true if active schema can mutate global sets. |
canMutateTags() | Return true if active schema can mutate tags. |
canQueryAssets() | Return true if active schema can query assets. |
canQueryCategories() | Return true if active schema can query categories. |
canQueryEntries() | Return true if active schema can query entries. |
canQueryGlobalSets() | Return true if active schema can query global sets. |
canQueryTags() | Return true if active schema can query tags. |
canQueryUsers() | Return true if active schema can query users. |
canSchema() | Returns true if the active schema can perform the action on the scope. |
createFullAccessSchema() | Creates a temporary schema with full access to the GraphQL API. |
extractAllowedEntitiesFromSchema() | Extracts all the allowed entities from the active schema for the action. |
extractEntityAllowedActions() | Return a list of all the actions the current schema is allowed for a given entity. |
getFieldNameWithAlias() | Looking at the resolve information and the source queried, return the field name or it's alias, if used. |
getUnionType() | Get (and create if needed) a union type by name, included types and a resolver funcion. |
isSchemaAwareOf() | Returns true if the active schema is aware of the provided scope(s). |
prepareTransformArguments() | Prepare arguments intended for Asset transforms. |
wrapInNonNull() | Wrap a GQL object type in a NonNull type. |
# applyDirectives()
Apply directives (if any) to a resolved value according to source and resolve info.
Arguments
$source
$resolveInfo
(\GraphQL\Type\Definition\ResolveInfo
)$value
Returns
mixed
# canMutateAssets()
- Since
- 3.5.0
Return true if active schema can mutate assets.
Returns
# canMutateCategories()
- Since
- 3.5.0
Return true if active schema can mutate categories.
Returns
# canMutateEntries()
- Since
- 3.5.0
Return true if active schema can mutate entries.
Returns
# canMutateGlobalSets()
- Since
- 3.5.0
Return true if active schema can mutate global sets.
Returns
# canMutateTags()
- Since
- 3.5.0
Return true if active schema can mutate tags.
Returns
# canQueryAssets()
Return true if active schema can query assets.
Returns
# canQueryCategories()
Return true if active schema can query categories.
Returns
# canQueryEntries()
Return true if active schema can query entries.
Returns
# canQueryGlobalSets()
Return true if active schema can query global sets.
Returns
# canQueryTags()
Return true if active schema can query tags.
Returns
# canQueryUsers()
Return true if active schema can query users.
Returns
# canSchema()
Returns true if the active schema can perform the action on the scope.
Arguments
Returns
Throws
# createFullAccessSchema()
- Since
- 3.4.0
Creates a temporary schema with full access to the GraphQL API.
Returns
# extractAllowedEntitiesFromSchema()
Extracts all the allowed entities from the active schema for the action.
Arguments
$action
(string) – The action for which the entities should be extracted. Defaults to "read"
Returns
# extractEntityAllowedActions()
Return a list of all the actions the current schema is allowed for a given entity.
Arguments
$entity
(string)
Returns
# getFieldNameWithAlias()
Looking at the resolve information and the source queried, return the field name or it's alias, if used.
Arguments
$resolveInfo
(\GraphQL\Type\Definition\ResolveInfo
)$source
$context
Returns
# getUnionType()
Get (and create if needed) a union type by name, included types and a resolver funcion.
Arguments
$typeName
(string) – The union type name.$includedTypes
(array) – The type the union should include$resolveFunction
(callable) – The resolver function to use to resolve a specific type.
Returns
mixed
# isSchemaAwareOf()
Returns true if the active schema is aware of the provided scope(s).
Arguments
Returns
# prepareTransformArguments()
- Since
- 3.5.3
Prepare arguments intended for Asset transforms.
Arguments
$arguments
(array)
Returns
# wrapInNonNull()
Wrap a GQL object type in a NonNull type.
Arguments
$type
Returns
mixed
← FileHelper Html →