ActivityFeed

EDM_IRELAND
New Member
4 0 0

I need to retrieve the entire ActivityFeed urgently. The GraphQL query for ActivityFeed doesn't support pagination so I have wrote a bulk operation query to download the data. The operation starts successfully and when I poll it states it's in progress, however after a few mins it fails with an internal server error.

Any help how I can download entire Activity log or even filter for a specific date would be much appreciated 

 

 

mutation {
  bulkOperationRunQuery(
    query:"""

query ActivityFeed {
  staffMember {
    id
    privateData {
      activityFeed(first: 10) {
        pageInfo {
          hasNextPage
          __typename
        }
        edges {
          ...Activity
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
}

fragment Activity on ActivityEdge {
  cursor
  node {
    author
    createdAt
    messages
    attributed
    __typename
  }
  __typename
}

    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 



 

{
    "data": {
        "node": {
            "id": "gid://shopify/BulkOperation/162958377122",
            "status": "FAILED",
            "errorCode": "INTERNAL_SERVER_ERROR",
            "createdAt": "2021-01-30T11:10:52Z",
            "completedAt": null,
            "objectCount": "0",
            "fileSize": null,
            "url": null,
            "partialDataUrl": null
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 1,
            "actualQueryCost": 1,
            "throttleStatus": {
                "maximumAvailable": 5000.0,
                "currentlyAvailable": 4999,
                "restoreRate": 250.0
            }
        }
    }
}

 

 

0 Likes
_JB
Shopify Staff
Shopify Staff
750 87 165

Hey @EDM_IRELAND,

I'm not aware of ActivityFeed being exposed on any of our APIs. There are a few old posts that mention this field, but this field was never meant to be exposed through the API so it's expected to encounter errors when using it in a bulk operation. 

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes