Skip to content
Console(opens in a new tab)

Everything starts with an intent

Pick an intent. It sets the response you get, the inputs you can use, and what the call costs.

The intent drives everything: it controls the type of response you get, the inputs you can use, and how much the API call will cost.

The intents below carry most of the work. The GraphQL reference lists every other read and every write.

Intent I would like to…
search …find businesses matching a description, and read their details.
aggregate …count every operating location Enigma holds.
enrich …enrich my own list of businesses using Enigma’s data.
backgroundTask …check the status of a job I started.
account …see my plan, credits or usage.

Safeway locations in Texas, five of them, ordered by city. texasLocations counts all of them so you can see how many the five came from.

query {
search(searchInput: {
entityType: BRAND
name: "Safeway"
conditions: { limit: 1 }
}) {
... on Brand {
id
names(first: 1) { edges { node { name } } }
texasLocations: count(
field: "operatingLocations"
conditions: { filter: { EQ: ["addresses.state", "TX"] } }
)
operatingLocations(
first: 5
conditions: {
filter: { EQ: ["addresses.state", "TX"] }
orderBy: ["addresses.city ASC"]
}
) {
edges { node {
addresses(first: 1) {
edges { node { streetAddress1 city state } }
}
} }
}
}
}
}