--- title: metafieldDefinitions - GraphQL Admin description: Returns a list of metafield definitions. api_version: 2024-10 api_name: admin type: query api_type: graphql source_url: html: >- https://shopify.dev/docs/api/admin-graphql/2024-10/queries/metafieldDefinitions md: >- https://shopify.dev/docs/api/admin-graphql/2024-10/queries/metafieldDefinitions.txt --- # metafield​Definitions query Returns a list of metafield definitions. ## MetafieldDefinitionConnection arguments [MetafieldDefinitionConnection!](https://shopify.dev/docs/api/admin-graphql/2024-10/connections/MetafieldDefinitionConnection) * after [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * constraint​Status [Metafield​Definition​Constraint​Status](https://shopify.dev/docs/api/admin-graphql/2024-10/enums/MetafieldDefinitionConstraintStatus) Filter metafield definitions based on whether they are constrained. * constraint​Subtype [Metafield​Definition​Constraint​Subtype​Identifier](https://shopify.dev/docs/api/admin-graphql/2024-10/input-objects/MetafieldDefinitionConstraintSubtypeIdentifier) Filter metafield definitions based on whether they apply to a given resource subtype. * first [Int](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/Int) The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * key [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) Filter metafield definition by key. * last [Int](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * namespace [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) Filter metafield definition by namespace. * owner​Type [Metafield​Owner​Type!](https://shopify.dev/docs/api/admin-graphql/2024-10/enums/MetafieldOwnerType) required Filter the metafield definition by the specific owner type. * pinned​Status [Metafield​Definition​Pinned​Status](https://shopify.dev/docs/api/admin-graphql/2024-10/enums/MetafieldDefinitionPinnedStatus) Default:ANY Filter the metafield definition by the pinned status. * query [String](https://shopify.dev/docs/api/admin-graphql/2024-10/scalars/String) A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * * default string * created\_at time * id id * key string * namespace string * owner\_type string * type string * updated\_at time - Filter by a case-insensitive search of multiple fields in a document. - Example: * `query=Bob Norman` * `query=title:green hoodie` Filter by the date and time when the metafield definition was created. - Example: * `created_at:>2020-10-21T23:39:20Z` * `created_at:=1234` * `id:<=1234` Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field. - Example: * `key:some-key` Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field. - Example: * `namespace:some-namespace` Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field. - Example: * `owner_type:PRODUCT` Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field. - Example: * `type:single_line_text_field` Filter by the date and time when the metafield definition was last updated. Example: * `updated_at:>2020-10-21T23:39:20Z` * `updated_at: