-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: add note that pagination helpers are examples and should be adapted by users #12699
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
base: main
Are you sure you want to change the base?
Conversation
|
commit: |
size-limit report 📦
|
@@ -3,6 +3,8 @@ title: Core pagination API | |||
description: Fetching and caching paginated results | |||
--- | |||
|
|||
> **Note:** The pagination helper functions provided by Apollo Client (such as `offsetLimitPagination` and `relayStylePagination`) are mostly examples of how to implement a type policy for paginated fields. In most cases, you will need to copy these helpers into your own codebase and adjust them to your requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **Note:** The pagination helper functions provided by Apollo Client (such as `offsetLimitPagination` and `relayStylePagination`) are mostly examples of how to implement a type policy for paginated fields. In most cases, you will need to copy these helpers into your own codebase and adjust them to your requirements. | |
<Note> | |
The pagination helper functions provided by Apollo Client (such as `offsetLimitPagination` and `relayStylePagination`) may not be suitable for all use cases. If you need further customization, copy the implementation into your own codebase and adjust them to your requirements. | |
</Note> |
Since we export these helpers from the library, I don't really like calling them "examples" since they can be used directly. "Example" makes it seem like you shouldn't use these. I'd rather tell users to customize it when it doesn't suit their needs rather than try to encourage them to copy it right away.
NOTE: This suggestion applies to each code block in this PR
As an experiment, I've created this PR with GitHub Copilot in the Web UI.
WDYT @jerelmiller ?