---
title: MetafieldConnection - Shop Users API
description: The connection type for Metafield.
api_version: unstable latest
source_url:
  html: https://shopify.dev/docs/api/shop-users/latest/connections/MetafieldConnection
  md: https://shopify.dev/docs/api/shop-users/latest/connections/MetafieldConnection.md
---

# Metafield​Connection

connection

The connection type for Metafield.

## Queries with this connection

* [metafields](https://shopify.dev/docs/api/shop-users/latest/queries/metafields)

  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.

  * after

    [String](https://shopify.dev/docs/api/shop-users/latest/scalars/String)

    ### Arguments

    Returns the elements that come after the specified cursor.

  * before

    [String](https://shopify.dev/docs/api/shop-users/latest/scalars/String)

    Returns the elements that come before the specified cursor.

  * first

    [Int](https://shopify.dev/docs/api/shop-users/latest/scalars/Int)

    Returns up to the first `n` elements from the list.

  * identifiers

    [\[Custom​Data​Key​Pair​Input!\]](https://shopify.dev/docs/api/shop-users/latest/input-objects/CustomDataKeyPairInput)

    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.

  * last

    [Int](https://shopify.dev/docs/api/shop-users/latest/scalars/Int)

    Returns up to the last `n` elements from the list.

  * reverse

    [Boolean](https://shopify.dev/docs/api/shop-users/latest/scalars/Boolean)

    Reverse the order of the underlying list.

  * sort​Key

    [Metafield​Permissible​Sort​Keys](https://shopify.dev/docs/api/shop-users/latest/enums/MetafieldPermissibleSortKeys)

    Default:KEY

    Sort the underlying listing by the given key.

  ***

***

## Possible returns

* edges

  [\[Metafield​Edge!\]!](https://shopify.dev/docs/api/shop-users/latest/objects/MetafieldEdge)

  non-null

  A list of edges.

* nodes

  [\[Metafield!\]!](https://shopify.dev/docs/api/shop-users/latest/objects/Metafield)

  non-null

  A list of nodes.

* page​Info

  [Page​Info!](https://shopify.dev/docs/api/shop-users/latest/objects/PageInfo)

  non-null

  Information to aid in pagination.

***

## Map

### Queries with this connection

* [metafields](https://shopify.dev/docs/api/shop-users/latest/queries/metafields)

### Possible returns

* [Metafield​Connection.edges](https://shopify.dev/docs/api/shop-users/latest/connections/MetafieldConnection#returns-edges)
* [Metafield​Connection.nodes](https://shopify.dev/docs/api/shop-users/latest/connections/MetafieldConnection#returns-nodes)
* [Metafield​Connection.pageInfo](https://shopify.dev/docs/api/shop-users/latest/connections/MetafieldConnection#returns-pageInfo)