Skip to content

Releases: Jcparkyn/phetch

v0.1.2

06 Aug 07:38
Compare
Choose a tag to compare

Changes

  • Enabled source link, debug symbols, and deterministic builds.
  • Added null checks to public methods, so they now throw ArgumentNullException if null is passed where it shouldn't be.

Other

  • Set up CI deployments with GitHub actions

v0.1.1

01 Aug 01:44
Compare
Choose a tag to compare

Changes

  • Query.Cancel() now causes the query state to change immediately, rather than waiting for the query function to throw a TaskCanceledException.

New Features

  • Added a PrefetchAsync method to Endpoint, which can be used to fetch data ahead of time.
  • Added new overloads for Endpoint constructors which don't require a CancellationToken to be passed.
  • Added a Trigger() method to Query<T> that doesn't require an argument to be passed.

Bugfixes

  • Fixed a bug which caused Cancel() to result in a query error if the cancellation didn't happen synchronously.

v0.1.0

26 Jul 08:07
Compare
Choose a tag to compare

This release removes the concept of mutations as the previously existed, and instead combines the previous functionality of mutations into the Query class. This is a very significant change, but future releases should contain far fewer breaking changes.

BREAKING CHANGES:

  • Removes the existing Mutation and MutationEndpoint classes.
    • You can now just use the standard Query classes, and call Trigger instead of SetArg to get the same functionality.
  • Replaces QueryEndpoint with Endpoint, ParameterlessEndpoint, and 'MutationEndpoint` (depending on the shape of the query function).
  • Replaces UseQueryEndpoint with UseEndpoint, UseParameterlessEndpoint, and 'UseMutationEndpoint`.
  • Renames SetParam to SetArg.

New Features

  • Mutations now have all the same features as queries, including caching, cache updates/invalidation, and cancellation.
  • Adds OnSuccess/OnFailure options to both queries and endpoints.
  • Adds support for CancellationToken across the entire library.
  • Adds a Skip parameter to UseEndpoint, for conditional fetching.
  • Lots of extra documentation.

Other Changes

  • Fixes bugs involving the handling of out-of-order query returns.
  • Fixes bugs causing double-fetching
  • Fixes bugs causing unnecessary double-rendering of Blazor components.
  • Adds lots of automated tests.
  • Significantly improves the README.