- Docs
- API reference
- Endpoints and schemas
- GraphQL
GraphQL
Every keyword of the GraphQL schema, under the part of a query it belongs to.
For the endpoint, authentication, status codes and rate limits, read API basics.
A query is one sentence with a fixed set of parts. Every keyword of the schema belongs to one part, and this reference lists each keyword under its part. Each part opens with what it answers, then lists what it holds.
| Part | Written as | Answers | Pages |
|---|---|---|---|
| Intent | search |
What kind of answer do I want? | 15 |
| Subject | entityType: BRAND and ... on Brand |
What kind of thing am I looking for? | 5 |
| Match | name: "Safeway" |
Who do I mean? | 6 |
| Condition | conditions: { filter · orderBy · limit } |
Which of those do I keep, and in what order? | 1 |
| Connection | operatingLocations { edges { node } } |
How do I reach the records that hold the answer? | 1 |
| Selection | id · names · addresses · streetAddress1 |
What do I want to know about them? | 69 |
| Directives | cities: _fn @map @unique @join |
How should the answer read? | 14 |
| File | output: { filename, format } and s3Path |
Where does the data live? | 1 |
| Payload | name: "Texas merchants" |
What do I store? | 7 |
Every part in one search
Section titled “Every part in one search”Each comment names the part. The response follows.
query { search(searchInput: { # Intent entityType: BRAND # Subject name: "Safeway" # Match conditions: { limit: 1 } # Condition }) { ... on Brand { # Subject id # Selection names(first: 1) { edges { node { name } } } operatingLocations(first: 25, conditions: { filter: { EQ: ["addresses.state", "TX"] } # Condition orderBy: ["cardTransactions.projectedQuantity DESC"] # Condition }) { edges { node { # Connection addresses(first: 1) { edges { node { streetAddress1 city state } } # Selection } } } } cities: _fn # Directives @map(refs: ["operatingLocations"], field: "edges.*.node.addresses.edges.0.node.city") @unique @join(sep: ", ") } }}Response, as returned:
{ "data": { "search": [ { "id": "0f26fbef-3436-4f85-8bcd-31fe12a4f99a", "names": { "edges": [ { "node": { "name": "SAFEWAY" } } ] }, "operatingLocations": { "edges": [ { "node": { "addresses": { "edges": [ { "node": { "streetAddress1": "200 FREEDOM DR", "city": "ROANOKE", "state": "TX" } } ] } } }, { "node": { "addresses": { "edges": [ { "node": { "streetAddress1": "743 HENRIETTA CREEK RD", "city": "ROANOKE", "state": "TX" …}