hasura / hasura/graphql-engine
[relay] Limit number of rows in select permission does not work with Relay
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
v2.13.0-cloud.1
### Environment
Cloud
### What is the current behaviour?
If you set row limit for a given role, the relay pagination will stop at that specific limit (not per request, but in total)

### What is the expected behaviour?
If you set row limit, I expect to limit the number of rows per fetched request, not per entire pagination/connection.
### How to reproduce the issue?
1. Create a table, fill in with many records
- Example: 100 records
2. Create a role
3. Set row limit for the given role and table, with a number less than the total number of records from step 1
- Example: 50
4. Fetch the relay connection with the relay API using the role from step 2, and providing the `first` argument
- Example: first 20 (you will be able to make 3 requests: 20 + 20 + 10, if you have row limit set to 50)
### Keywords
Relay, connections, pagination, row limit
Contributor guide
Research direction
Reproduce the Relay API connection using a role with a row limit and a smaller first argument, following the numbered steps in the issue. Trace how Relay pagination combines the role limit with successive requests, then add regression coverage showing the limit applies per fetched request and verify the documented 20 + 20 + 10 sequence can continue as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authorization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100