Releases: teamwalnut/rescript-urql
v1 🎉💅
This release represents the first stable reason of reason-urql
. From this point forward we'll be starting to enforce semantic versioning for all changes. Thank you so much to all of the contributors who helped us to achieve this milestone!
Added
- A Getting Started guide to help first time users of
reason-urql
get up and running.
Changed
- The
Error(e)
constructor of theresponse
variant has been moved above theData(d)
constructor to better matchurql
's JS API, where uses check for error responses on the GraphQL request before operating on data. - The
Types
andClient.Types
module
s were renamed toUrqlTypes
andClient.ClientTypes
to avoid namespace collisions with user-definedTypes
module
s.
Diff
Type Inference on the Client
This release adds improved type inference around the Client
's execute*
methods (i.e. executeQuery
, executeMutation
, and executeSubscription
). Responses will now be fully type checked at compile time. This release also pins the bound version of urql
to 1.0.5 to address a regression that occurs when using urql
> 1.2.0.
Changed
- Add proper type inference to
Client.execute*
methods. This now involves passing the fullgraphql_ppx
module to theClient
such that it can grab theparse
method off of it to properly infer the response. This mimics exactly how the components and hooks work. - Reorganize types to reduce redundancy and ensure unique generation of
[@bs.deriving abstract]
accessors. This change is mostly internal, but it begins to isolated types used by differentmodule
s into submodules. For example, rather than all types living in the top-levelTypes
module, certain types reserved for particular domains, i.e. theClient
, live in a submodule i.e.Client.Types
.
CombinedError and FetchOption Function
This release adds small improvements around client.fetchOptions
and the CombinedError
API.
Changed
- The
FetchFn
variant of the client'sfetchOptions
argument now supports calling the function at runtime of the client rather than invoking it early in order to pass afetchOptions
object tourql
. UrqlCombinedError
is now properly bound using OCaml classes. A helper was added to convert theCombinedError
Js.t
to a record type to allow for nicer, typesafe access.
Diff
Hooks
This release includes support for urql
hooks, including useQuery
, useMutation
, and useSubscription
. It also includes additions to support proper type inference of GraphQL requests, such that users get compile-time guarantees that they are accessing data in a fully type-safe way.
Added
- Bindings for
useQuery
,useMutation
, anduseSubscription
. - Bindings for
SubscriptionWithHandler
, which is to be used in cases where a customhandler
function is passed to theSubscription
component to accumulate subscriptions. - The top-level
urql
context object, which exposes aConsumer
andProvider
, is now exposed to the user.
Changed
- Migrated all components and examples to latest ReasonReact syntax (
"jsx: 3"
). - Add proper type inference for hooks and components. This is achieved by passing the entire
graphql_ppx
module to the hooks, which allows them to use theparse
method to infer the return type of data from the request.
🎉v1 (Beta)
This represents the beta release of v1, which provides support for urql
v1.
Added
- Bindings for
Query
,Mutation
, andSubscription
components. - Bindings for
Client
with support for exchanges. - Bindings for
Provider
. - Bindings for
urql
's type interfaces, utils, and helpers. - Examples for
Query
,Mutation
,Subscription
, exposed exchanges, custom exchanges, and imperativeClient
methods. - First tests for
UrqlClient
.
Diff
Coverage 💅
Added
- Additional tests for
Query
,Mutation
,Connect
, andClient
.
Fixed
- The
invalidate
cache operation supplied toConnect
now properly accepts a single, optional labelled argument~query: Query.urqlQuery
. This will now type check properly thanks to a final positionalunit
parameter in the type definition.
Diff
We're Stable(ish)!
Welcome to v0.1.0 of reason-urql
. With this release, we are moving into a stable state and will continue onwards with standard semantic versioning.
Added
- Automated builds with Travis CI.
- Automated coverage reporting with Coveralls.
- Unit tests for
UrqlQuery
,UrqlMutation
,UrqlConnect
,UrqlClient
, andUrqlProvider
. - Codified utilities for making tests more concise – see
TestUtils.re
. - Zero-config, hot reloading in the example project.
- Small, non-breaking changes to the API.
Diff
v0.1.0-beta – GraphQL, meet Reason
This is the initial beta release of reason-urql
! These bindings are currently untested and should not be used in production just yet. Come help us by writing tests, opening issues, and filing PRs. Thanks!