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:
- The server MUST ignore
sortField, sortOrder, filters, and pageSize when pageToken is present.
- The server MUST return
400 if parameters conflict with the state encoded in pageToken.
- 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)
Can we define how
pageTokeninteracts with the other query parameters?For cursor/token pagination, clients need to know whether
pageTokenalready encapsulates the original query state, including filters,sortField,sortOrder, and possiblypageSize.For example, if the first request uses:
sortField=createdDate&sortOrder=desc&pageSize=25and the next request sends:
pageToken=...&sortField=version&sortOrder=asc&pageSize=100what should the server do?
Possible options:
sortField,sortOrder, filters, andpageSizewhenpageTokenis present.400if parameters conflict with the state encoded inpageToken.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)