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-urqlget up and running.
Changed
- The
Error(e)constructor of theresponsevariant 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
TypesandClient.Typesmodules were renamed toUrqlTypesandClient.ClientTypesto avoid namespace collisions with user-definedTypesmodules.
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_ppxmodule to theClientsuch that it can grab theparsemethod 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 differentmodules into submodules. For example, rather than all types living in the top-levelTypesmodule, 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
FetchFnvariant of the client'sfetchOptionsargument now supports calling the function at runtime of the client rather than invoking it early in order to pass afetchOptionsobject tourql. UrqlCombinedErroris now properly bound using OCaml classes. A helper was added to convert theCombinedErrorJs.tto 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 customhandlerfunction is passed to theSubscriptioncomponent to accumulate subscriptions. - The top-level
urqlcontext object, which exposes aConsumerandProvider, 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_ppxmodule to the hooks, which allows them to use theparsemethod 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, andSubscriptioncomponents. - Bindings for
Clientwith 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 imperativeClientmethods. - First tests for
UrqlClient.
Diff
Coverage 💅
Added
- Additional tests for
Query,Mutation,Connect, andClient.
Fixed
- The
invalidatecache operation supplied toConnectnow properly accepts a single, optional labelled argument~query: Query.urqlQuery. This will now type check properly thanks to a final positionalunitparameter 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!