rescript-urql

ReScript bindings for Formidable's Universal React Query Library, urql.

MIT License

Stars
236
Committers
23

Bot releases are hidden (Show)

rescript-urql - v1 🎉💅

Published by parkerziegler about 5 years ago

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 the response variant has been moved above the Data(d) constructor to better match urql's JS API, where uses check for error responses on the GraphQL request before operating on data.
  • The Types and Client.Types modules were renamed to UrqlTypes and Client.ClientTypes to avoid namespace collisions with user-defined Types modules.

Diff

https://github.com/FormidableLabs/reason-urql/compare/v1.0.0-beta.3...v1.0.0

rescript-urql - Type Inference on the Client

Published by parkerziegler about 5 years ago

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 full graphql_ppx module to the Client such that it can grab the parse 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 different modules into submodules. For example, rather than all types living in the top-level Types module, certain types reserved for particular domains, i.e. the Client, live in a submodule i.e. Client.Types.
rescript-urql - CombinedError and FetchOption Function

Published by parkerziegler about 5 years ago

This release adds small improvements around client.fetchOptions and the CombinedError API.

Changed

  • The FetchFn variant of the client's fetchOptions argument now supports calling the function at runtime of the client rather than invoking it early in order to pass a fetchOptions object to urql.
  • UrqlCombinedError is now properly bound using OCaml classes. A helper was added to convert the CombinedError Js.t to a record type to allow for nicer, typesafe access.

Diff

https://github.com/FormidableLabs/reason-urql/compare/v1.0.0-beta.1...v1.0.0-beta.2

rescript-urql - Hooks

Published by parkerziegler over 5 years ago

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, and useSubscription.
  • Bindings for SubscriptionWithHandler, which is to be used in cases where a custom handler function is passed to the Subscription component to accumulate subscriptions.
  • The top-level urql context object, which exposes a Consumer and Provider, 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 the parse method to infer the return type of data from the request.
rescript-urql - 🎉v1 (Beta)

Published by parkerziegler over 5 years ago

This represents the beta release of v1, which provides support for urql v1.

Added

  • Bindings for Query, Mutation, and Subscription 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 imperative Client methods.
  • First tests for UrqlClient.

Diff

https://github.com/parkerziegler/reason-urql/compare/v0.1.1...v1.0.0-beta

rescript-urql - Coverage 💅

Published by parkerziegler over 5 years ago

Added

  • Additional tests for Query, Mutation, Connect, and Client.

Fixed

  • The invalidate cache operation supplied to Connect now properly accepts a single, optional labelled argument ~query: Query.urqlQuery. This will now type check properly thanks to a final positional unit parameter in the type definition.

Diff

https://github.com/parkerziegler/reason-urql/compare/v0.1.0...v0.1.1

rescript-urql - We're Stable(ish)!

Published by parkerziegler almost 6 years ago

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, and UrqlProvider.
  • 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

https://github.com/parkerziegler/reason-urql/compare/v0.1.0-beta...v0.1.0

rescript-urql - v0.1.0-beta – GraphQL, meet Reason

Published by parkerziegler about 6 years ago

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!

Badges
Extracted from project README
npm All Contributors Build Status
Related Projects