{"action":"opened","issue":{"url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/440","repository_url":"https://api.github.com/repos/Shopify/js-buy-sdk","labels_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/440/comments","events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/440/events","html_url":"https://github.com/Shopify/js-buy-sdk/issues/440","id":268729816,"number":440,"title":"1.0.0-beta.3: pagination not working","user":{"login":"DanWebb","id":5038459,"avatar_url":"https://avatars0.githubusercontent.com/u/5038459?v=4","gravatar_id":"","url":"https://api.github.com/users/DanWebb","html_url":"https://github.com/DanWebb","followers_url":"https://api.github.com/users/DanWebb/followers","following_url":"https://api.github.com/users/DanWebb/following{/other_user}","gists_url":"https://api.github.com/users/DanWebb/gists{/gist_id}","starred_url":"https://api.github.com/users/DanWebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanWebb/subscriptions","organizations_url":"https://api.github.com/users/DanWebb/orgs","repos_url":"https://api.github.com/users/DanWebb/repos","events_url":"https://api.github.com/users/DanWebb/events{/privacy}","received_events_url":"https://api.github.com/users/DanWebb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-26T11:49:52Z","updated_at":"2017-10-26T11:49:52Z","closed_at":null,"author_association":"NONE","body":"I'm using the v1.0.0-beta.3 release and having issues getting pagination to work.\r\n\r\nWhen calling `client.fetchNextPage` with `collection.products` returned from an original call to `client.collection.fetchWithProducts` I get the following error \"Uncaught (in promise) TypeError: Cannot read property 'node' of undefined\" looking further into this the issue seems to be caused by `$productsFirst` inside the query is set to `undefined`.\r\n\r\nThe query seems to be set via a call to `node.nextPageQueryAndPath` so I presume the issue is in that method somewhere.\r\n\r\nThe contents of `collection.products` looks like this...\r\n<img width=\"615\" alt=\"screen shot 2017-10-26 at 18 44 11\" src=\"https://user-images.githubusercontent.com/5038459/32051162-c95b2cba-ba7d-11e7-904b-c4adb773d587.png\">\r\n\r\nIn case it helps to be more specific about how I'm calling each method, I start by fetching the collection like so:\r\n```\r\nclient.collection.fetchWithProducts(collectionId).then((data) => {\r\n      collection = data;\r\n});\r\n```\r\n\r\nThen later attempt to get the next page using:\r\n```\r\nclient.fetchNextPage(collection.products).then((nextPageOfProducts) => {\r\n  // ...\r\n});\r\n```\r\n "}}
{"actor":{"display_login":"DanWebb"}}