Filtering

Filter WebPixie GraphQL list queries with WQL, WebPixie's compact, SQL-like query syntax.

Most list queries (the ones starting with find, e.g. findSite, findUptimeLink, findIncident) accept an optional query argument — a string written in WQL (WebPixie Query Language), a compact, SQL-like syntax used to filter results.

Discovering Filterable Fields

Not every field on a type can be used in a query string. Each filterable resource has a matching *FilterableFields enum in the schema (e.g. SiteFilterableFields, UptimeLinkFilterableFields) listing exactly which fields that resource's find query supports. Discover it via introspection:

query {
  __type(name: "SiteFilterableFields") {
    enumValues {
      name
    }
  }
}

Enum values are shown in UPPER_SNAKE_CASE (e.g. IS_FAVORITE), but the query string itself uses the corresponding camelCase field name (isFavorite) — convert the enum name to camelCase before using it in a filter.

Basic Structure

field operator value
query {
  findSite(query: "domain = \"acme.io\"") {
    items {
      domain
    }
  }
}

Combining Conditions

Combine conditions with AND / OR, and use parentheses to group them:

status = ACTIVE AND checkInterval > 60
(status = ACTIVE OR status = PASSIVE) AND isFavorite = TRUE

Conditions are evaluated left-to-right. Use parentheses whenever you mix AND and OR in the same query so the conditions group the way you expect.

Operators

OperatorDescriptionExample
=Equal tostatus = ACTIVE
!=Not equal tostatus != ACTIVE
>Greater thancheckInterval > 60
>=Greater than or equal tocheckInterval >= 60
<Less thancheckInterval < 300
<=Less than or equal tocheckInterval <= 300
BETWEENInclusive range (numbers and dates only)checkInterval BETWEEN (60, 300)
INValue is one of a liststatus IN (ACTIVE, PASSIVE)
NOT INValue is not any of a liststatus NOT IN (PASSIVE)
~Contains (case-insensitive)domain ~ "acme"
!~Does not containdomain !~ "test"
IS / IS NOTNull / empty / boolean checks — see belowtags IS NOT NULL

Special Values

Use IS / IS NOT with NULL, EMPTY, TRUE, and FALSE:

tags IS NULL
tags IS NOT NULL
name IS EMPTY
isFavorite IS TRUE

These keywords are case-sensitive and must be uppercase (IS NULL, not IS null). A lowercase form is treated as a literal text value instead of matching null or empty fields.

Lists

For IN / NOT IN, separate values with commas inside parentheses, without quotes — even for text values:

status IN (ACTIVE, PASSIVE)

Text Values

Quote a text value if it contains spaces or special characters; unquoted text is also accepted when it doesn't. Quoted values cannot contain a literal " character.

domain = acme.io
name = "Acme Inc"

Limits

Reasonable limits apply to overall query length, nested grouping depth, the length of any single value, and list size. Exceeding any of them returns a GraphQL error describing which limit was hit — keep filter values reasonably short and grouping shallow.

On this page