Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GraphQL pagination to Decision Records #6080

Closed
wants to merge 2 commits into from

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Sep 19, 2024

Summary

Add a page for best practices for API Design and add a guideline for pagination to it.

Issue

This was discussed in the developer meeting on 19. Sep 2024

Unit tests

🟥 Not relevant

Documentation

✅ Add developer doc

Changelog

🟥 Not relevant

Bumping the serialization version id

🟥 Not relevant

@t2gran t2gran added this to the 2.7 (next release) milestone Sep 19, 2024
@t2gran t2gran requested a review from a team as a code owner September 19, 2024 21:03
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.90%. Comparing base (048a219) to head (f431d17).
Report is 580 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6080      +/-   ##
=============================================
+ Coverage      69.78%   69.90%   +0.11%     
- Complexity     17357    17723     +366     
=============================================
  Files           1962     1998      +36     
  Lines          74359    75443    +1084     
  Branches        7624     7718      +94     
=============================================
+ Hits           51894    52741     +847     
- Misses         19821    20025     +204     
- Partials        2644     2677      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few typos

@optionsome
Copy link
Member

optionsome commented Sep 20, 2024

I think there is some confusion here. The discussion we had yesterday related to #6045 . We debated if the leg should implement node interface (https://relay.dev/graphql/objectidentification.htm) and be refetchable through the node query. It's not really related to pagination. In the relay connection specification, there is a field called node, but it doesn't need to return a type that implements the node interface.

We have already added a planConnection query to the GTFS GraphQL API which implements the relay connection pagination. I think the persistence of the objects is not as important with pagination as it's not really used for refetching objects in the future but rather to search for more results with a cursor.

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken marked this pull request as draft October 15, 2024 08:48
Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
@t2gran
Copy link
Member Author

t2gran commented Oct 24, 2024

@optionsome Sorry for mixing relay/node/connection/pagination - would you be intrested in taking this over. I can move the branch to the main repo so you can edit it? (I will in that case close this PR, and open a new one.)

@optionsome
Copy link
Member

@optionsome Sorry for mixing relay/node/connection/pagination - would you be intrested in taking this over. I can move the branch to the main repo so you can edit it? (I will in that case close this PR, and open a new one.)

Yes, I can help you with this.

@t2gran
Copy link
Member Author

t2gran commented Oct 24, 2024

This is replaced by #6193

@t2gran t2gran closed this Oct 24, 2024
@t2gran t2gran modified the milestones: 2.7 (next release), Rejected Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants