Skip to content

Can we define how pageToken interacts with the other query parameters? #251

@oej

Description

@oej

Can we define how pageToken interacts with the other query parameters?

For cursor/token pagination, clients need to know whether pageToken already encapsulates the original query state, including filters, sortField, sortOrder, and possibly pageSize.

For example, if the first request uses:

sortField=createdDate&sortOrder=desc&pageSize=25

and the next request sends:

pageToken=...&sortField=version&sortOrder=asc&pageSize=100

what should the server do?

Possible options:

  1. The server MUST ignore sortField, sortOrder, filters, and pageSize when pageToken is present.
  2. The server MUST return 400 if parameters conflict with the state encoded in pageToken.
  3. The client MUST repeat the same parameters, and mismatch is an invalid request.

I think the spec should choose one behavior before v1.0 to avoid incompatible implementations. Defining this behavior now will ensure forward compatibility and consistent behavior across different TEA server implementations.

Originally posted by @Mehrn0ush in #231 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions