Activity Feed GraphQL Help More

Highlighted
Tourist
10 0 2

I am trying to get my activity feed and I get the first 250,

 

but 

 

I am trying to do the request again and get the next page 

 

{
    "operationName": "ActivityFeed",
    "variables": {
        "first": 20
    },
    "query": "query ActivityFeed($first: Int!) {\n  staffMember {\n    id\n    privateData {\n      activityFeed(first: $first) {\n        pageInfo {\n          hasNextPage\n          __typename\n        }\n        edges {\n          ...Activity\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment Activity on ActivityEdge {\n  cursor\n  node {\n    author\n    createdAt\n    messages\n    topic\n    attributed\n    __typename\n  }\n  __typename\n}\n"
}

which returns good data

{
    "data": {
        "staffMember": {
            "id": "gid://shopify/StaffMember/35235070006",
            "privateData": {
                "activityFeed": {
                    "pageInfo": {
                        "hasNextPage": true,
                        "__typename": "PageInfo"
                    },
                    "edges": [
                        {
                            "cursor": "asdasdasdasdasd",
                            "node": {
                                "author": "Customify - Product Customizer",
                                "createdAt": "2020-02-20T12:00:04Z",
                                "messages": [
                                    "The recurring application charge status for <a href=\"https://<webaddress>.myshopify.com/admin/apps/customify\">Customify - Product Customizer</a> was updated to expired."
                                ],
                                "topic": "DEFAULT",
                                "attributed": true,
                                "__typename": "Activity"
                            },
                            "__typename": "ActivityEdge"
                        },
                        {
                            "cursor": "asdasdasdasdasd",
                            "node": {
                                "author": "Product Personalizer",
                                "createdAt": "2020-02-20T12:00:04Z",
                                "messages": [
                                    "The recurring application charge status for <a href=\"https://<webaddress>.myshopify.com/admin/apps/product-personalizer\">Product Personalizer</a> was updated to expired."
                                ],
                                "topic": "DEFAULT",
                                "attributed": true,
                                "__typename": "Activity"
                            },
                            "__typename": "ActivityEdge"
                        },
                        {
                            "cursor": "asdasdasdasdasd",
                            "node": {
                                "author": "Product Personalizer",
                                "createdAt": "2020-02-20T12:00:04Z",
                                "messages": [
                                    "The recurring application charge status for <a href=\"https://<webaddress>.myshopify.com/admin/apps/product-personalizer\">Product Personalizer</a> was updated to expired."
                                ],
                                "topic": "DEFAULT",
                                "attributed": true,
                                "__typename": "Activity"
                            },
                            "__typename": "ActivityEdge"
                        },
                        {
                            "cursor": "MjAyMC0wMi0xOSAyMToxNDo1NCAtMDcwMA==",
                            "node": {
                                "author": "Help Center",
                                "createdAt": "2020-02-20T04:14:54Z",
                                "messages": [
                                    "has revoked API access from Help Center."
                                ],
                                "topic": "APPS",
                                "attributed": false,
                                "__typename": "Activity"
                            },
                            "__typename": "ActivityEdge"
                        },
                        {
                            "cursor": "MjAyMC0wMi0xOSAyMToxNDo1MyAtMDcwMA==",
                            "node": {
                                "author": "asdasdasdasd",
                                "createdAt": "2020-02-20T04:14:53Z",
                                "messages": [
                                    "has granted API access to Help Center."
                                ],
                                "topic": "APPS",
                                "attributed": false,
                                "__typename": "Activity"
                            },
                            "__typename": "ActivityEdge"
                        },

 

 

 

 

I thought it was first, after

 

 

 

 

 

{
"operationName": "ActivityFeed",
"variables": {
"first": 250,
"cursor": "asdasdasdasdasdas"
},
"query": "query ActivityFeed($first: Int! $cursor: String) {\n staffMember {\n id\n privateData {\n activityFeed(first: $first, after: $cursor) {\n pageInfo {\n hasNextPage\n __typename\n }\n edges {\n ...Activity\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n\nfragment Activity on ActivityEdge {\n cursor\n node {\n author\n createdAt\n messages\n topic\n attributed\n __typename\n }\n __typename\n}\n"
}

 

{
    "errors": [
        {
            "message": "Field 'activityFeed' doesn't accept argument 'after'",
            "locations": [
                {
                    "line": 5,
                    "column": 35
                }
            ],
            "path": [
                "query ActivityFeed",
                "staffMember",
                "privateData",
                "activityFeed",
                "after"
            ],
            "extensions": {
                "code": "argumentNotAccepted",
                "name": "activityFeed",
                "typeName": "Field",
                "argumentName": "after"

https://community.shopify.com/c/Custom-Storefronts-Support/GraphQL-to-pull-activity-feed/m-p/615077#...

0 Likes