Releases: teamwalnut/rescript-urql
BuckleScript 7 Support
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 methodsquery
andmutation
on the Client. This allows users to interact with Client operation results asJs.Promise.t
rather thanWonka.sourceT
. PR by @parkerziegler here. - Add bindings for the
useClient
hook. PR by @parkerziegler here.
Changed
- Migrate local
devDependency
onbs-platform
to v7.2.2 and in-repo compilation target toes6
. PR by @parkerziegler here. - Remove
peerDependency
onbs-fetch
.
Diff
urql 1.4.0 Compatibility
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 touseQuery
hook andQuery
component. PR by @JoviDeCroock here.
Diff
Extensions, Custom Fetch Implementation, Configurable Operation Contexts
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 toclientOptions
. Pr by @parkerziegler here. - Support an optional
context
argument toexecuteQuery
andexecuteMutation
, in addition to an optional initialcontext
prop / argument for theQuery
component anduseQuery
hook. PRs by @parkerziegler here and here.
Fixed
- Improved documentation on the
reason-urql
API. PR by @parkerziegler here.
v1.4.1
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
useDynamicMutation support!
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 callingexecuteMutation
. PR by @Schmavery and @sgrove here.
Fixed
- Restore CI by migrating off of GitHub Actions to Travis CI. PR by @parkerziegler here.
Diff
bs-platform 6 Support 🎉
This release migrates us to [email protected]
and ensures reason-urql
is compatible for codebases using latest bs-platform
.
Added
- Documentation on using
graphql_ppx_re
withreason-urql
. PR by @huy-nguyen here. - Improved Getting Started documentation. PR by @parkerziegler here.
Changed
- Fix type for
pause
argument toQuery
component for[email protected]
. PR by @gugahoa here. - Migrate to
[email protected]
in source. Fix compiler warnings. RenamepartialOperationContextFn
toexecuteQuery
. This is a breaking change.
Diff
v1.2.0
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 ameta
property on it, containing fields forsource
,cacheOutcome
, andnetworkLatency
. These fields are likely to be deprecated in the next minor release and moved tobs-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
SSR ⚡
This release adds experimental support for server-side rendering with the addition of bindings for the ssrExchange
.
Added
- Bindings for
ssrExchange
and thesuspense
option on theClient.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
andpackage.json
files from theexamples
directory are no longer published tonpm
.
Diff
v1.0.2
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
- More documentation on
CombinedError
in the API docs. PR by @Schmavery and @parkerziegler here.
Changed
CombinedError.t
now references the record exposed by theCombinedError
module containing fields formessage
,networkError
,graphQLErrors
, andmessage
. PR by @Schmavery and @parkerziegler here.
Fixed
- Capitalization / casing for the
graphQLErrors
field onCombinedError.t
. Previously this was bound asgraphqlErrors
, which would always result inNone
being returned asurql
has nographqlErrors
field. PR by @Schmavery here.
Diff
v1.0.1
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 adevDependency
forreason-urql
and can also be installed as apeerDependency
if you want to use a different version in your app. PR by @parkerziegler and @gugahoa here.
Added
message
field onCombinedError.combinedError
. This represents the raw stringmessage
returned by theurql
client for your requests. PR by @Schmavery here.