View Source Bonfire.API.GraphQL.Pages (Bonfire v0.9.10-classic-beta.169)
Summary
Functions
Returns a Page for the given key, defaulting to an empty one
Returns a post-batch callback (i.e. the third argument to batch/3) for a key which calls get() with the callback param and the key
Create a new pages from a data map, counts map, cursor function and page opts
Create a new Pages from some data rows, count rows and a grouping key. Groups the data by the grouping key on insertion and turns the counts into a map ready for lookup on a per-row basis.
Types
Functions
Returns a Page for the given key, defaulting to an empty one
Returns a post-batch callback (i.e. the third argument to batch/3) for a key which calls get() with the callback param and the key
Create a new pages from a data map, counts map, cursor function and page opts
Create a new Pages from some data rows, count rows and a grouping key. Groups the data by the grouping key on insertion and turns the counts into a map ready for lookup on a per-row basis.
Note: if the grouping key is not present in the returned data rows, this function will crash. Our intuition is that this would mean an error in the calling code, so we would rather raise it early.