PrivateMetafield object
Private metafields represent custom metadata that is attached to a resource. Private metafields are private to the application that creates them on a shop’s resources.
On this page
Fields
- createdAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01)
)
The date and time when the private metafield was created. - id (
[ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01)
)
The id of the private metafield. - key (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
The key name for a private metafield. - namespace (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
The namespace for a private metafield. - updatedAt (
[DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01)
)
The date and time when the private metafield was updated. - value (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)
)
The value of a private metafield. - valueType (
[PrivateMetafieldValueType!](https://shopify.dev/docs/admin-api/graphql/reference/metafields/privatemetafieldvaluetype)
)
Represents the private metafield value type.
Types that return PrivateMetafield
[Collection.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection#privatemetafields-2021-01)
[Collection.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collection#privatemetafield-2021-01)
[Customer.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#privatemetafield-2021-01)
[Customer.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#privatemetafields-2021-01)
[DraftOrder.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder#privatemetafield-2021-01)
[DraftOrder.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/orders/draftorder#privatemetafields-2021-01)
[Image.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image#privatemetafield-2021-01)
[Image.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/image#privatemetafields-2021-01)
[Order.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#privatemetafields-2021-01)
[Order.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/orders/order#privatemetafield-2021-01)
[Product.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#privatemetafield-2021-01)
[Product.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/product#privatemetafields-2021-01)
[ProductVariant.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#privatemetafield-2021-01)
[ProductVariant.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/productvariant#privatemetafields-2021-01)
[QueryRoot.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#privatemetafields-2021-01)
[QueryRoot.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#privatemetafield-2021-01)
[Shop.privateMetafield](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#privatemetafield-2021-01)
[Shop.privateMetafields](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop#privatemetafields-2021-01)
Mutations for PrivateMetafield
- privateMetafieldDelete
Deletes a private metafield. - privateMetafieldUpsert
Creates or update a private metafield.
Implements
[Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)