HasMetafields interface
Represents information about the metafields associated to the specified resource.
Fields
- metafield (
[Metafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafield)
)
The metafield associated with the resource.
Argument |
Description |
key (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) REQUIRED |
Identifier for the metafield (maximum of 30 characters). |
namespace (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) REQUIRED |
Container for a set of metafields (maximum of 20 characters). |
- metafields (
[MetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafieldconnection)
)
A paginated list of metafields associated with the resource.
Argument |
Description |
after (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Returns the elements that come after the specified cursor. |
before (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Returns the elements that come before the specified cursor. |
first (
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) ) |
Returns up to the first n elements from the list. |
last (
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) ) |
Returns up to the last n elements from the list. |
namespace (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Finds all metafields with a specific namespace under the resource. |
reverse (
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01) ) |
Reverse the order of the underlying list. Default value: false |
- privateMetafield (
[PrivateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafield)
)
Returns a private metafield found by namespace and key.
Argument |
Description |
key (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) REQUIRED |
The key for the private metafield. |
namespace (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) REQUIRED |
The namespace for the private metafield. |
- privateMetafields (
[PrivateMetafieldConnection!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafieldconnection)
)
List of private metafields.
Argument |
Description |
after (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Returns the elements that come after the specified cursor. |
before (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Returns the elements that come before the specified cursor. |
first (
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) ) |
Returns up to the first n elements from the list. |
last (
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01) ) |
Returns up to the last n elements from the list. |
namespace (
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01) ) |
Filter the private metafields by namespace. |
reverse (
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01) ) |
Reverse the order of the underlying list. Default value: false |
Types that implement HasMetafields
[Collection](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection)
[Customer](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer)
[DraftOrder](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder)
[Image](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image)
[Order](https://shopify.dev/docs/admin-api/graphql/reference/orders/order)
[Product](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product)
[ProductVariant](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant)
[Shop](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop)