Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We currently support a
page[offset]
parameter. This updates the codebase to acceptbefore
andafter
cursors, applying the relevantoffset
logic as appropriate.When JSON:API we're render
meta: { cursor: <cursor> }
for each entity, and when flat JSON/GraphQL we'll render_cursor: <cursor>
. This is to support GQL queries likeWe're not doing a full
edges
implementation because A) I just kinda hate it and B) to value here is metadata about the relationship, mostly for M2M relationships, which Graphiti doesn't support yet anyway.The cursor is Base64 encoded JSON of
{offset: <offset>}
.In addition, we accept
?fields[page_info]=has_next_page,etc
to render the relevantpageInfo
section. This uses the same code already used to populate pagination links and cursors.