Map

JSON object scalar for storing flexible key-value data structures

A scalar representing a map of key-value pairs, typically serialized as a JSON object.

Description

The Map scalar type represents an unstructured JSON object that can contain arbitrary key-value pairs. It's used for storing flexible, schema-less data structures that may vary between entities of the same type. This is particularly useful for custom fields, metadata, and extensible configurations.

Usage Example

query {
  inventoryItems(
    where: { 
      Data: ["color", "size"] 
      DataContains: ["red", "large"]
    }
  ) {
    edges {
      node {
        id
        sku
        data # This returns a Map scalar
      }
    }
  }
}

Last updated

Was this helpful?