元字段-Metafield 对象

元字段表示附加到资源的自定义元数据。可以将元字段分类为名称空间,并由键,值和值类型组成。

在本页面

字段

  • createdAt[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01)
    创建元字段的日期和时间。
  • description[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
    对元字段的描述。
  • id[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)
    全局唯一标识符。
  • key[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
    元字段的键名。
  • legacyResourceId[UnsignedInt64!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#unsignedint64-2021-01)
    REST Admin API中相应资源的ID。
  • namespace[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
    元字段的名称空间。
  • ownerType[MetafieldOwnerType!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafieldownertype)
    Storefront API可见的元字段的所有者类型。
  • UpdatedAt[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01)
    更新元字段的日期和时间。
  • value[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
    元字段的值。
  • valueType[MetafieldValueType!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/metafieldvaluetype)
    表示元字段值类型。

返回Metafield的类型

  • [Collection.metafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection#metafield-2021-01)
  • [Collection.metafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection#metafields-2021-01)
  • [Customer.metafield](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#metafield-2021-01)
  • [Customer.metafields](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#metafields-2021-01)
  • [DraftOrder.metafield](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder#metafield-2021-01)
  • [DraftOrder.metafields](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder#metafields-2021-01)
  • [Image.metafield](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image#metafield-2021-01)
  • [Image.metafields](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image#metafields-2021-01)
  • [Order.metafield](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#metafield-2021-01)
  • [Order.metafields](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#metafields-2021-01)
  • [Product.metafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#metafield-2021-01)
  • [Product.metafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#metafields-2021-01)
  • [ProductVariant.metafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#metafield-2021-01)
  • [ProductVariant.metafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#metafields-2021-01)
  • [Shop.metafield](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#metafield-2021-01)
  • [Shop.metafields](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#metafields-2021-01)

元字段的突变

派生关系

  • [LegacyInteroperability](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/legacyinteroperability)
  • [Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)