Skip to content

Releases: teamwalnut/rescript-urql

BuckleScript 7 Support

17 Apr 16:01
Compare
Choose a tag to compare

This release migrates our dependency on urql to v1.5.1. It also migrates our devDependency on bs-platform (the BuckleScript compiler), to v7.2.2. While we don't expect this to affect end users still on BuckleScript v6, there may be small bugfixes and optimizations coming in the near future to support this migration.

Added

  • Add support for Promise-based methods query and mutation on the Client. This allows users to interact with Client operation results as Js.Promise.t rather than Wonka.sourceT. PR by @parkerziegler here.
  • Add bindings for the useClient hook. PR by @parkerziegler here.

Changed

  • Migrate local devDependency on bs-platform to v7.2.2 and in-repo compilation target to es6. PR by @parkerziegler here.
  • Remove peerDependency on bs-fetch.

Diff

v1.6.0...v1.7.0

urql 1.4.0 Compatibility

01 Apr 04:59
Compare
Choose a tag to compare

This release migrates our dependency on urql to v1.4.0. This adds support for setting a default requestPolicy on the Client, in addition to setting up polling for your GraphQL queries using the pollInterval argument to useQuery and the Query component.

Added

  • Add option to set a default requestPolicy on the Client. PR by @JoviDeCroock here.
  • Add pollInterval argument to useQuery hook and Query component. PR by @JoviDeCroock here.

Diff

v1.5.0...v1.6.0

Extensions, Custom Fetch Implementation, Configurable Operation Contexts

13 Jan 00:28
Compare
Choose a tag to compare

This release migrates our dependency on urql to v1.3.0. As such, we now have support for GraphQL extensions, custom fetch implementations, and adjustable operation contexts for queries and mutations.

Added

  • Access GraphQL extensions returned by your GraphQL API inside all hooks and componentts. PR by @parkerziegler here.
  • Add support for a custom fetch implementation to clientOptions. Pr by @parkerziegler here.
  • Support an optional context argument to executeQuery and executeMutation, in addition to an optional initial context prop / argument for the Query component and useQuery hook. PRs by @parkerziegler here and here.

Fixed

v1.4.1

16 Dec 18:46
Compare
Choose a tag to compare

This release fixes a small bug with requestPolicy in useQuery. We weren't properly converting the polymorphic variants passed by a user to their JS string representation, which led to improper request policies being used by the urql Client.

Fixed

  • Properly unwrap user-supplied requestPolicy to the matching JS string representation. PR by @baransu here.

Diff

v1.4.0...v1.4.1

useDynamicMutation support!

08 Dec 18:22
Compare
Choose a tag to compare

This release adds support for a useDynamicMutation hook, which allows users to pass variables to the executeMutation function returned by the hook at execution time, as opposed to at render time as useMutation does.

Added

  • Add useDyanmicMutation hook to support applying variables when calling executeMutation. PR by @Schmavery and @sgrove here.

Fixed

Diff

v1.3.0...v1.4.0

bs-platform 6 Support 🎉

12 Nov 18:00
Compare
Choose a tag to compare

This release migrates us to [email protected] and ensures reason-urql is compatible for codebases using latest bs-platform.

Added

Changed

Diff

v1.2.0...v1.3.0

v1.2.0

29 Oct 17:55
Compare
Choose a tag to compare

This release upgrades our urql dependency to 1.2.0 and picks up a handful of small bugfixes introduced in that release.

Added

  • The operationContext object now has a meta property on it, containing fields for source, cacheOutcome, and networkLatency. These fields are likely to be deprecated in the next minor release and moved to bs-urql-devtools-exchange.

Changed

  • urql dependency upgraded to v1.2.0!
  • bs-platform dependency upgraded to v5.2.1! PR by @parkerziegler here.
  • Some cmall changes to spurce up the example projects!

Diff

v1.1.0...v1.2.0

SSR ⚡

17 Oct 23:58
Compare
Choose a tag to compare

This release adds experimental support for server-side rendering with the addition of bindings for the ssrExchange.

Added

  • Bindings for ssrExchange and the suspense option on the Client.make function. PR by @parkerziegler here.
  • Initial docs for server side rendering support. PR by @parkerziegler here.

Changed

  • urql dependency upgraded to v1.1.3!

Fixed

  • Minor docs fix by for the Client module. PR by @robinweser here.
  • bsconfig.json and package.json files from the examples directory are no longer published to npm.

Diff

v1.0.2...v1.1.0

v1.0.2

06 Oct 06:33
Compare
Choose a tag to compare

This release makes a small change around the API for CombinedError. Specifically, the module type t for CombinedError now refers to the record exposed by the module rather than the Js.t / OCaml class binding urql's native CombinedError class. Better documentation for CombinedError was also added.

Added

Changed

  • CombinedError.t now references the record exposed by the CombinedError module containing fields for message, networkError, graphQLErrors, and message. PR by @Schmavery and @parkerziegler here.

Fixed

  • Capitalization / casing for the graphQLErrors field on CombinedError.t. Previously this was bound as graphqlErrors, which would always result in None being returned as urql has no graphqlErrors field. PR by @Schmavery here.

Diff

v1.0.1...v1.0.2

v1.0.1

27 Sep 00:20
Compare
Choose a tag to compare

This release removes bs-fetch as a dependency such that it doesn't conflict with a user's local copy of bs-fetch. Since we only use bs-fetch for type checking fetchOptions, it can safely be included as a devDependency. This release also adds a message field on the combinedError record to provide users access to the raw error string from urql.

Removed

  • Dependency on bs-fetch. bs-fetch is now a devDependency for reason-urql and can also be installed as a peerDependency if you want to use a different version in your app. PR by @parkerziegler and @gugahoa here.

Added

  • message field on CombinedError.combinedError. This represents the raw string message returned by the urql client for your requests. PR by @Schmavery here.

Diff

v1.0.0...v1.0.1