Repository navigation
Merge a list paged by number under @paged - #56
Merged
Merged
Conversation
A list paged by number says so with @PageD(key:, page:) on the list field inside the field that takes the page. The pages merge into a client record of the container's type on the container's parent, keyed by the list field and its arguments, with its own page info; the first page replaces, the next appends, a merged page rewrites in place; hasNext reads hasNextPage only; loadNext() runs the owner's operation with the next page. Answers issue 49; the watch list's trigger, a second real schema without cursors, was met by AniList.
A list a schema pages by number, as every list on AniList is, says so with @PageD(key:, page:) on the list field inside the field that takes the page. The pages merge into a client record of the container's type on the container's parent, keyed by the list field and its arguments with the container's other arguments, with its own page info, so two lists under one server page, two seasons of one list and two page sizes never share it. The first page replaces, the next appends, a page already merged rewrites its span in place, any other is ignored; the merge copies only the fields the operation selected of the container. The container's lens gains hasNext, which reads hasNextPage alone, isLoadingNext and loadNext(), which runs the operation that owns the lens with the next page. The compiler declares the directive beside @cacheExpiration, lowers it onto the container field and reports what it names at the directive. Swift format 21, Kotlin format 5. Answers issue 49.
…ann-b0d306 # Conflicts: # CHANGELOG.md # compiler/src/tests/goldens-kotlin/Baton.baton.kt # compiler/src/tests/goldens/Baton.baton.swift # compiler/src/tests/reports/BatonTests.report.json # spec/tests/schema.graphql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers #49: a directive for lists paged by page number, decided in
docs/decisions/a-paged-list-merges-its-pages-by-number.md.@paged(key:, page:)on the list field inside the field that takes the page. The pages merge into a client record of the container's type on the container's parent, keyed by the list field and its arguments with the container's other arguments, with its own page info, apart from the server's page record two lists may share. The first page replaces, the next appends, a page already merged rewrites its span in place, any other is ignored; only the fields the operation selected of the container follow the page.hasNext(the mergedpageInfo.hasNextPage, nothing else),isLoadingNextandloadNext(), which runs the operation that owns the lens with the next page and the operation's other variables; no@refetchableis needed, and a refetch of the owner replaces the list.@cacheExpiration, so Relay's front end types its arguments and a server never sees it; the lowering checks the directive's place, key, variable, container and page info and reports at the directive. Swift format 21, Kotlin format 5.Ownercarrying the query that owns its lenses.paged-notes-1to-3,paged-notes-2-edited,paged-characters-1,friends-1andfriends-2and the scriptpaged; unit tests on both sides forloadNext(); compiler tests for every diagnostic and the plan shape; goldens and sources re-blessed.Not chosen, each with its reopening condition in the record: offsets, a previous page, edge directives into a paged list, and a second reading of the flag for a page info that is not
pageInfo { hasNextPage }.The local check list passes: boundaries, the compiler build, the Swift build with tests, the hostile-name sweep, the Swift tests in debug and release, library evolution, the iOS Controllers build,
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test; also the KotlinjvmTest(172) and the Kotlin goldens module, and the site build.