{"action":"opened","issue":{"url":"https://api.github.com/repos/BE-Webdesign/wp-graphql/issues/41","repository_url":"https://api.github.com/repos/BE-Webdesign/wp-graphql","labels_url":"https://api.github.com/repos/BE-Webdesign/wp-graphql/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/BE-Webdesign/wp-graphql/issues/41/comments","events_url":"https://api.github.com/repos/BE-Webdesign/wp-graphql/issues/41/events","html_url":"https://github.com/BE-Webdesign/wp-graphql/issues/41","id":187886807,"number":41,"title":"Implement a GraphQL collection model.","user":{"login":"BE-Webdesign","id":16389612,"avatar_url":"https://avatars.githubusercontent.com/u/16389612?v=3","gravatar_id":"","url":"https://api.github.com/users/BE-Webdesign","html_url":"https://github.com/BE-Webdesign","followers_url":"https://api.github.com/users/BE-Webdesign/followers","following_url":"https://api.github.com/users/BE-Webdesign/following{/other_user}","gists_url":"https://api.github.com/users/BE-Webdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/BE-Webdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BE-Webdesign/subscriptions","organizations_url":"https://api.github.com/users/BE-Webdesign/orgs","repos_url":"https://api.github.com/users/BE-Webdesign/repos","events_url":"https://api.github.com/users/BE-Webdesign/events{/privacy}","received_events_url":"https://api.github.com/users/BE-Webdesign/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-08T02:36:57Z","updated_at":"2016-11-08T02:36:57Z","closed_at":null,"body":"Eventually we will want a collection model that will be programatically created based on what types we need.  This will be built out of our WordPress primitives, Post, Comment, User etc.  The GraphQL post collection model should look something like this.\r\n\r\n```\r\npostCollection(first: $howManyItems, after: $offsetOfCursor) {\r\n  totalCount\r\n  edges {\r\n    node {\r\n      ...postFields\r\n    }\r\n    cursor\r\n  }\r\n  pageInfo {\r\n    endCursor\r\n    hasNextPage\r\n  }\r\n}\r\n```\r\n\r\nThe collection types can use a collection interface which will feature three fields totalCount: total count of resources, edges (the list of edges in our graph), and a pageInfo object field containing the last cursor and whether there is another page of results for pagination in the collection."}}
{"actor":{"display_login":"BE-Webdesign"}}