Metafield
Metafields enable you to attach additional information to a Shop domain resource, such as a User.
Anchor to FieldsFields
- definition (MetafieldDefinition!)
- ownerId (String!)
- ownerType (CustomDataOwnerType!)
- value (String!)
- Anchor to definitiondefinition•Metafield
Definition! non-null The metafield definition that the metafield belongs to.
- Anchor to ownerIdowner•String!
Id non-null The GID of resource that this metafield belongs to.
- Anchor to ownerTypeowner•Custom
Type Data Owner Type! non-null The type of resource that this metafield belongs to.
- Anchor to valuevalue•String!non-null
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Anchor to QueriesQueries
- metafield (Metafield)
- metafields (MetafieldConnection!)
- •query
Retrieve a Metafield by their Definition's Key or Namspace and Key. Leave blank to retreive all metafields on the user that your client has access to.
- Anchor to identifieridentifier•Custom
Data Key Pair Input! required Key and namespace pair that together form the path to the definition. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided.
Arguments
- •query
Retrieve Metafields by their Definition's Key or Namspace and Key. Leave blank to retreive all metafields on the user that your client has access to.
- Anchor to afterafter•String
Returns the elements that come after the specified cursor.
- Anchor to beforebefore•String
Returns the elements that come before the specified cursor.
- Anchor to firstfirst•Int
Returns up to the first
nelements from the list.- Anchor to identifiersidentifiers•[Custom
Data Key Pair Input!] Default:[] Key and namespace pair that together form the path to the definition. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided. Leave blank to see everything available to the client on the user.
- Anchor to lastlast•Int
Returns up to the last
nelements from the list.- Anchor to reversereverse•Boolean
Reverse the order of the underlying list.
- Anchor to sortKeysort•Metafield
Key Permissible Sort Keys Default:KEY Sort the underlying listing by the given key.
Arguments
Anchor to MutationsMutations
- metafieldDelete (MetafieldDeletePayload)
- metafieldsSet (MetafieldsSetPayload)
- •mutation
Remove a Metafield corresponding to a definition from a user.
- Anchor to identifieridentifier•Custom
Data Key Pair Input! required Key and namespace pair that together form the path to the definition. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided
Arguments
- •mutation
Set or Update a Metafield on a resource.
- Anchor to metafieldsmetafields•[Metafield
Set Input!]! required
Arguments