Filter Examples
This topic describes two examples of filtering to find specific customers with Optimizely Data Platform's (ODP's) GraphQL API.
You can find specific customers using the GraphQL filter
function. Below are some examples.
- Find the customer whose first name is Jacob.
query MyQuery {
customers (filter: "first_name = 'Jacob'") {
  edges {
  node {
    first_name
    email
    name
}
}
}
}
- Find the customers whose email contains Jacob.
query MyQuery {
customers (filter: "email =~ 'Jacob*'") {
  edges {
  node {
    first_name
    email
   name
}
}
}
}
Updated 10 months ago