API Reference

Available queries

Option - Returns a single option based on the id provided

query {
  Option (id: 100012) {
    id
    label
  }
}

Options - Returns a list of options based on the filter define

query {
  Options {
    data {
    	id
    	label
    }
  }
}


Available fields

id - Int
Unique identifier of the option
label - String
Title of the option
attributes - Array of Attribute - Subquery
Attributes of the option


Filters

You can create filters based on following fields

label
Example:{ "column" : "LABEL", "operator" : "EQ", "value" : "color" }

Sorting

You can sort data based on following fields : id, label

Example of a query

query Options($where: QueryOptionsWhereWhereConditions, $first: Int = 10, $page: Int, $trashed: Trashed) {
  Options(where: $where, first: $first, page: $page, trashed: $trashed) {
    paginatorInfo {
      total
      count
      currentPage
      perPage
    }
    data {
      id
      label
      attributes {
        paginatorInfo {
          total
        }
      }
    }
  }
}
{
  "first": 10,
  "page": 1,
  "where": {
    "AND": [
      {
        "AND": [
          {
            "column": "LABEL",
            "operator": "LIKE",
            "value": "%olor%"
          }
        ]
      }
    ]
  }
}

Example of data returned

{
  "data": {
    "Options": {
      "paginatorInfo": {
        "total": 1,
        "count": 1,
        "currentPage": 1,
        "perPage": 10
      },
      "data": [
        {
          "id": 100000,
          "label": "Color",
          "attributes": {
            "paginatorInfo": {
              "total": 6
            }
          }
        }
      ]
    }
  }
}