Skip to content

How to apply pagination on big database ? #6

Closed
@VincentClair

Description

@VincentClair

If I want to apply pagination to some objects, the better way seems to be compatible with Relay.
I have read all specifications about relay, and seen that you have already implemented Connections and Nodes (this last one seems not to be mandatory, but hardly advise).

I think i must use ConnectionBuilder::connectionFromArraySlice directly, with the result of a query to my database (with doctrine) and the arguments (first, after, etc.). Must i pass something special like total number of entities ?

I have read too a discussion about adding arguments for filtering/ordering. graphql/graphql-relay-js#20
Have you some advices for this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions