You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is a stupid question, I have read the documentation, searched the issues and searched in discussions and could't find any answer to my question.
So, I understand the benefits of cursor based pagination, I have it working fine in my schema, used in a Rails API with ActiveRecord. I was puzzled to see that after all, when I see the queries, ActiveRecord is still using LIMIT/OFFSET behind the scenes. Everything works as expected – I can use the graphql queries with first, after, etc.
Is this expected? Is the default connection implementation suposed to do this? I checked ActiveRecordRelationConnection in the source code and indeed I can see the limit and offset there.
Am I missing the point? I thought that the whole goal of cursor based pagination was to avoid offsets.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
Sorry if this is a stupid question, I have read the documentation, searched the issues and searched in discussions and could't find any answer to my question.
So, I understand the benefits of cursor based pagination, I have it working fine in my schema, used in a Rails API with ActiveRecord. I was puzzled to see that after all, when I see the queries, ActiveRecord is still using LIMIT/OFFSET behind the scenes. Everything works as expected – I can use the graphql queries with
first
,after
, etc.Is this expected? Is the default connection implementation suposed to do this? I checked
ActiveRecordRelationConnection
in the source code and indeed I can see the limit and offset there.Am I missing the point? I thought that the whole goal of cursor based pagination was to avoid offsets.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions