Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

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

Solved

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

BogdanLyashenko
Shopify Partner
3 1 2

 

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.

Accepted Solution (1)

BogdanLyashenko
Shopify Partner
3 1 2

This is an accepted solution.

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
      }
    }
  }
}

View solution in original post

Reply 1 (1)

BogdanLyashenko
Shopify Partner
3 1 2

This is an accepted solution.

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
      }
    }
  }
}