Gql ​
- Type
- Class
- Namespace
- craft\commerce\helpers
- Inherits
- craft\commerce\helpers\Gql » craft\helpers\Gql
- Since
- 3.0
Class Commerce 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. |
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. |
canQueryDrafts() | Return true if active schema can query for drafts. |
canQueryEntries() | Return true if active schema can query entries. |
canQueryGlobalSets() | Return true if active schema can query global sets. |
canQueryInactiveElements() | Return true if active schema can query for inactive elements. |
canQueryProducts() | Return true if active schema can query products. |
canQueryRevisions() | Return true if active schema can query for revisions. |
canQueryTags() | Return true if active schema can query tags. |
canQueryUsers() | Return true if active schema can query users. |
canSchema() | Returns whether the given component is included in a schema, for the given action. |
createFullAccessSchema() | Creates a temporary schema with full access to the GraphQL API. |
eagerLoadComplexity() | Shorthand for returning the complexity function for an eager-loaded field. |
extractAllowedEntitiesFromSchema() | Extracts all the allowed entities from a schema for the given action. |
extractEntityAllowedActions() | Return a list of all the actions the current schema is allowed for a given entity. |
getAllowedSites() | Get a list of all allowed sites by Schema. |
getFieldNameWithAlias() | Looking at the resolve information and the source queried, return the field name or it's alias, if used. |
getSchemaContainedEntryTypes() | Return all entry types a given (or loaded) schema contains. |
getSchemaContainedNestedEntryFields() | Returns all nested entry fields a given (or loaded) schema contains. |
getSchemaContainedSections() | Returns all sections a given (or loaded) schema contains. |
getUnionType() | Get (and create if needed) a union type by name, included types and a resolver function. |
isIntrospectionQuery() | Returns whether the given GraphQL query looks like an introspection query. |
isSchemaAwareOf() | Returns whether the given component(s) are included in a schema’s scope. |
nPlus1Complexity() | Shorthand for returning the complexity function for a field that will generate a single query for every iteration. |
prepareTransformArguments() | Prepare arguments intended for asset transforms. |
relatedArgumentComplexity() | Shorthand for returning the complexity function for a field that will add a single query to execution. |
singleQueryComplexity() | Shorthand for returning the complexity function for a field that will add a single query to execution. |
wrapInNonNull() | Wrap a GQL object type in a NonNull type. |
canQueryProducts()
​
Return true if active schema can query products.