Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add paginate directive and transform * inject page info into cursor-based pagination * add validators for @paginate * fixed pagination check * rework internal api for looking up fragment arguments * a required argument must be flagged with a ! * @paginate arg adds arguments to its fragment * hoist first, last, and limit as fragment arguments * hoist the pagination args as default values * attempt to clean up pagination transform logic * unname unused variable * continue cleaning up pagination transform * hoist correctly * fix snapshot tests * embed pagination fragment in a new query * embed existing args as default values to query * point snapshots at generated query * fix tests * dont rely on fragment argument transform for paginate tests * fragment variables transform define fragments in new document * add utils to verify node interface * validate node interface and field * paginating a fragment on node embeds it in a query on node * paginate directive can only appear in a document once * error if cursor pagination goes forwards and backwards * @paginate cannot appear on a fragment with required args * paginate from query * paginated queries don't overlap existing variables * more overlapping tests * coordinate pagination transform with a central state object * embed refetch meta data in artifact * added tests for refetch spec * tests pass * invert generated flag - some generated documents need to be there * add paginate directive and transform * inject page info into cursor-based pagination * add validators for @paginate * fixed pagination check * rework internal api for looking up fragment arguments * a required argument must be flagged with a ! * @paginate arg adds arguments to its fragment * hoist first, last, and limit as fragment arguments * hoist the pagination args as default values * attempt to clean up pagination transform logic * unname unused variable * continue cleaning up pagination transform * hoist correctly * fix snapshot tests * embed pagination fragment in a new query * embed existing args as default values to query * point snapshots at generated query * fix tests * dont rely on fragment argument transform for paginate tests * fragment variables transform define fragments in new document * add utils to verify node interface * validate node interface and field * paginating a fragment on node embeds it in a query on node * paginate directive can only appear in a document once * error if cursor pagination goes forwards and backwards * @paginate cannot appear on a fragment with required args * paginate from query * paginated queries don't overlap existing variables * more overlapping tests * coordinate pagination transform with a central state object * embed refetch meta data in artifact * added tests for refetch spec * tests pass * invert generated flag - some generated documents need to be there * move pagination query name convention to config * update example to use connections * define paginatedQuery * embed pagination behavior on appropriate field * cache.write args are now an object * rename selection.paginate to update * failing tests for updating cache with pagination values * cache can optionally merge results with existing values * build artifact as object before serializing * fix duplicate update field * fix keys for embedded data * write data before subscribing so subscribers dont get lost * pass current page info as store * @list tagged connections have the correct fragments generated * lists on connections get flagged in their artifacts * cache can append to connections * @paginate can provide a list name * failing test for removing record from connection * can remove record from connection * implement loadPreviousPage * add list names and mutations back in * add list item subscription back * verify insert and deletes from connections * update list location directives with schema-less api * update cache test * removed record list references * make sure the store always has the fresh version when writing new data * cleanup * split up loadNext and loadPrevious functions * start implementing offset pagination handler * fix types in scalar tests * first pass at offset pagination loader * failing test for correctly loaded node in pagination result * overwrite entries in a connection that come from list operations * remove unreachable code * add embedded flag to query refetch spec for fragments under node * better test for embedded fragment queries * first pass at paginatedFragment * handle paginated componentQueries * dont add __typename everywhere, just unions, interfaces, and connections * only use typename for embedded references if it exists * add preliminary documentation for pagination support * v0.10.0-alpha.0 * fix pagination link in readme * fix forward cursor-based example * pass id to embedded fragment queries * v0.10.0-alpha.1 * document name arg of paginate directive * actually mix in query variables 🤦 * v0.10.0-alpha.2 * clarify that paginatedQueries do not need node interface/resolver * typo in readme * added missing fence to readme * add paginated fragments and mutation operations to table of contents * fix pageInfo example * merge main * merge conflict in code of conduct * more readme tweaks * undo CoC changes * grammar is hard * pass extra variables to offset pagination handler * pass extra variables to loadNextPage * bump * more bumps * v0.10.0-alpha.5 * connection targets might be non-null * v0.10.0-alpha.8 * add loading state to pagination handlers * v0.10.0-alpha.9 * document pagination loading state * dry up cursor page loads * more bumps * v0.10.0-alpha.11 * catch empty page sizes * mix query variables into pagination handlers * v0.10.0-alpha.12 * context variables overwrite default ones for queries * better check for missing page size * typo * v0.10.0-alpha.13
- Loading branch information