Rest API is legacy. But I can find analog for Events in GraphQL for orders resilience functional

Topic summary

Seeking a GraphQL equivalent to REST Admin API Events for Orders to support resilience checks (verifying data completeness over a date range). The author previously queried REST Events to confirm they had all fulfillments/events for a given period.

Resolution: The GraphQL API provides an events connection that can be filtered to mirror REST behavior. The author found a working query and confirmed the approach.

Key details:

  • Use events with a query filter like created_at:>=YYYY-MM-DD AND subjectType:‘ORDER’.
  • Request fields include id, message, subjectType, action (via BasicEvent), and createdAt.
  • Example pattern: events(query: “created_at:>=2024-10-01 AND subjectType:‘ORDER’”, first: 50) { edges { node { id message subjectType action createdAt } } }.

Outcome: Issue resolved by the author; no further questions raised. The GraphQL events query enables date-range order event retrieval analogous to the legacy REST Events endpoint.

Summarized with AI on December 16. AI used: gpt-5.

Hello. I’m wondering how I can achieve resilience using the GraphQL API instead of the REST Admin API.

Previously, I was able to call the Events resource for Orders and retrieve fulfillments for a selected date range, allowing me to verify if I had all the data. Now, I can’t find any equivalent solution using the GraphQL API, as it doesn’t have a separate events resource with the same functionality.

1 Like

Ok, Looks like I found it.

query {
events(query: “created_at:>=2024-10-01 AND subjectType:‘ORDER’”, first: 50) {
edges {
node {
id
message
…on BasicEvent{
subjectType
action
},
createdAt
}
}
}
}