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

Replace Paginator with ConnectionBuilder + more API changes #400

Merged
merged 41 commits into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3220905
Abstract CursorInterface
sgarner Jun 8, 2022
6879899
Abstract decodeCursorString function
sgarner Jun 8, 2022
822bc32
Rename Cursor.create() -> fromString(), refactor validation
sgarner Jun 8, 2022
3f43a30
Add EdgeFactoryInterface
sgarner Jun 8, 2022
cdc98f3
Add CursorPaginator
sgarner Jun 8, 2022
348612c
Move OffsetCursor to its own file
sgarner Jun 8, 2022
df407e7
Move EdgeFactory to src/factory
sgarner Jun 8, 2022
ea6ffa2
⚠️ Rename OffsetCursorPaginator.take -> edgesPerPage
sgarner Jun 8, 2022
62ca134
Add offset argument to EdgeFactory methods
sgarner Jun 8, 2022
cb878d7
Use correct Edge type in createPageInfo
sgarner Jun 8, 2022
be238c3
⚠️ Re-work OffsetCursorPaginator to match CursorPaginator
sgarner Jun 8, 2022
72bd04a
Handle empty results in CursorPaginator
sgarner Jun 8, 2022
6e040ab
Modify EdgeFactoryInterface type parameters
sgarner Jun 8, 2022
e0e75d6
Rename EdgeFactoryInterface -> EdgeFactory
sgarner Jun 8, 2022
282ebd3
Add TConnection type parameter to Paginator classes
sgarner Jun 8, 2022
8987188
Split factories out to separate functions
sgarner Jun 9, 2022
112b2ff
Add ConnectionBuilder, tests
sgarner Jun 11, 2022
7f91190
Use ConnectionBuilder in docs
sgarner Jun 11, 2022
a8c7ae1
Delete CursorPaginator
sgarner Jun 11, 2022
3438b9a
Add OffsetPaginatedConnectionBuilder
sgarner Jun 11, 2022
9352022
Delete OffsetCursorPaginator
sgarner Jun 11, 2022
31bc4af
Rename validateCursorParameters -> validateParamsUsingSchema
sgarner Jun 11, 2022
fefb311
Delete factory function types
sgarner Jun 11, 2022
dd6fa1f
Update docs
sgarner Jun 11, 2022
ff38f12
Add npm badge to README.md
sgarner Jun 11, 2022
894d18c
Add test for overriding createConnection & createEdge
sgarner Jun 11, 2022
b24f499
Add documentation for enriching edges with metadata
sgarner Jun 11, 2022
c739cad
Add MIT license file
sgarner Jun 11, 2022
9db9e32
deps: add ts-class-initializable
sgarner Jun 12, 2022
4b80086
Allow Edge types to be initialized with extra fields in constructor
sgarner Jun 12, 2022
7f683a3
Stop implementing graphql-relay types
sgarner Jun 12, 2022
fed34b5
Pass precise Edge type to ConnectionInterface instead of Node type
sgarner Jun 12, 2022
953e897
deps: remove graphql-relay
sgarner Jun 12, 2022
b49e74b
Allow Connection types to be initialized with extra fields in constru…
sgarner Jun 12, 2022
d3b9252
Update Edge initialization in documentation
sgarner Jun 12, 2022
a2bc97f
Save connectionArgs on ConnectionBuilder, add type argument
sgarner Jun 12, 2022
81aa66b
Bind this to overridden methods in ConnectionBuilder.build()
sgarner Jun 12, 2022
7c869c1
Add test for overriding createCursor using connectionArgs
sgarner Jun 12, 2022
6043176
Add documentation for customising cursors
sgarner Jun 12, 2022
474ee10
Fix code style issues with Prettier
equabot Jun 12, 2022
f795bec
Tweak headings in README.md
sgarner Jun 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-present Simon Garner and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading