Gql

Type
Class
Namespace
craft\commerce\helpers
Inherits
craft\commerce\helpers\Gql » craft\helpers\Gql (opens new window)
Since
3.0

Class Commerce Gql

View source (opens new window)

# Public Methods

Method Description
applyDirectives() (opens new window) Apply directives (if any) to a resolved value according to source and resolve info.
canMutateAssets() (opens new window) Return true if active schema can mutate assets.
canMutateCategories() (opens new window) Return true if active schema can mutate categories.
canMutateEntries() (opens new window) Return true if active schema can mutate entries.
canMutateGlobalSets() (opens new window) Return true if active schema can mutate global sets.
canMutateTags() (opens new window) Return true if active schema can mutate tags.
canQueryAssets() (opens new window) Return true if active schema can query assets.
canQueryCategories() (opens new window) Return true if active schema can query categories.
canQueryDrafts() (opens new window) Return true if active schema can query for drafts.
canQueryEntries() (opens new window) Return true if active schema can query entries.
canQueryGlobalSets() (opens new window) Return true if active schema can query global sets.
canQueryInactiveElements() (opens new window) Return true if active schema can query for inactive elements.
canQueryProducts() Return true if active schema can query products.
canQueryRevisions() (opens new window) Return true if active schema can query for revisions.
canQueryTags() (opens new window) Return true if active schema can query tags.
canQueryUsers() (opens new window) Return true if active schema can query users.
canSchema() (opens new window) Returns whether the given component is included in a schema, for the given action.
createFullAccessSchema() (opens new window) Creates a temporary schema with full access to the GraphQL API.
eagerLoadComplexity() (opens new window) Shorthand for returning the complexity function for an eager-loaded field.
extractAllowedEntitiesFromSchema() (opens new window) Extracts all the allowed entities from a schema for the given action.
extractEntityAllowedActions() (opens new window) Return a list of all the actions the current schema is allowed for a given entity.
getAllowedSites() (opens new window) Get a list of all allowed sites by Schema.
getFieldNameWithAlias() (opens new window) Looking at the resolve information and the source queried, return the field name or it's alias, if used.
getSchemaContainedEntryTypes() (opens new window) Return all entry types a given (or loaded) schema contains.
getUnionType() (opens new window) Get (and create if needed) a union type by name, included types and a resolver function.
isSchemaAwareOf() (opens new window) Returns whether the given component(s) are included in a schema’s scope.
nPlus1Complexity() (opens new window) Shorthand for returning the complexity function for a field that will generate a single query for every iteration.
prepareTransformArguments() (opens new window) Prepare arguments intended for asset transforms.
relatedArgumentComplexity() (opens new window) Shorthand for returning the complexity function for a field that will add a single query to execution.
singleQueryComplexity() (opens new window) Shorthand for returning the complexity function for a field that will add a single query to execution.
wrapInNonNull() (opens new window) Wrap a GQL object type in a NonNull type.

# canQueryProducts()

Return true if active schema can query products.

View source (opens new window)