Dropdown Field

Sample Dropdown Query

Query

{
menuItems {
name
availability
}
}

Output

{
"data": {
"menuItems": [
{
"name": "Classic Ham & Cheese",
"availability": ["Lunch", "Dinner"]
}
]
}
}

Filtering by Updated At

Updated At filters support:

  • _not
  • _in
  • _not_in
  • _lt
  • _lte
  • _gt
  • _gte

availability: [Availability!]

{
menuItems(where: { availability: Lunch }) {
name
availablility
}
}

availability_not: [Availability!]

{
menuItems(where: { availability_not: Breakfast }) {
name
availablility
}
}

availability_contains_all: [Availability!]

{
menuItems(where: { availability_contains_all: [Lunch] }) {
name
availablility
}
}

availability_contains_some: [Availability!]

{
menuItems(where: { availability_contains_some: [Lunch, Dinner] }) {
name
availablility
}
}

availability_contains_none: [Availability!]

{
menuItems(where: { availability_contains_none: [Lunch, Dinner] }) {
name
availablility
}
}

Mutating a Dropdown

Mutation

mutation {
createMenuItem(data: { name: "Special No. 7", availability: [Lunch] }) {
name
availability
}
}

Output

{
"data": {
"createMenuItem": {
"name": "Special No. 7",
"availability": ["Lunch"]
}
}
}

Were you expecting something more?

We are constantly contributing to our documentation, but if you spot something we're missing, let us know and we'll be sure to add it.

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy