Queries for Traits

trait

Returns a single trait.

trait(id) {
  /* Trait fields */
}

Arguments

id Int required

The ID of the Trait to return.

Response

Trait.* Trait

Any requested field from the Trait object.

Example

Request

query {
  trait(id: 1) {
    id
    name
    collection_id
    possible_values {
      type
      values
    }
  }
}

Response

{
  "data": {
    "trait": {
      "id": 1,
      "name": "Category",
      "collection_id": 7,
      "possible_values": {
        "type": "checkbox",
        "values": [
          "Volcanic",
          "Growth",
          "Psychedelic",
          "Harsh",
          "Chaos",
          "Mineral",
          "Spirit",
          "Decay"
        ]
      }
    }
  }
}