Releases: jeddeloh/rescript-apollo-client
Releases · jeddeloh/rescript-apollo-client
v0.0.1-beta.8
Breaking Changes
graphql-ppxconfiguration is now camelCased in bsconfig (this is actually deprecated in graphql-ppx but I'm not going to remember to tell you when it breaks later)
Features
- Added bindings for close method on
SubscriptionClient - Added bindings for
FieldReadFunction
Bug Fixes
FetchResultwas incorrectly typed as having a singleGraphqlError.trather than anarrayErrorLinkwas incorrectly types as returning anoption(NextLink.t)rather thanoption(Observable.t)
Documentation
- Added example for cache configuration using reactive variables
v0.0.1-beta.7
Breaking Changes
- Fleshed out types for
TypePolicies.t. Unfortunately this is not a zero-cost binding, so if you were previously casting aJs.ttoJs.Dict.t(TypePolicy.t)this will be a breaking change.
Features
- Added
makeVarbindings so you should be able to work with local state management using the aboveTypePolicies, but I have not tried it
v0.0.1-beta.6
Breaking Changes
- Hooks and client methods now take
t_variablesinstead ofRaw.t_variables. This means you're free to always pass a record for variables andmakeVariablesis a convenience function for passing a subset of optional variables.
Dependencies
- Bumped
graphql-ppxto v1.0.0-beta.22 - Dropped
@apollol/link-ws - Dropped
@apollol/link-error - Dropped
@apollol/link-context
v0.0.1-beta.5
Bugfix
FetchPolicy__noCacheExtractedwas incorrectly typed as the opposite set of possible values
v0.0.1-beta.4
Breaking Changes
ApolloClient.Link.makenow returns anoptioninstead ofJs.nullablesetContextandgetContextmethods pulled into their own functions and off theOperation.trecord
Features
- Added
setLinkmethod forApolloClient(useful if you're altering your links after some initialization!)
v0.0.1-beta.3
Breaking Changes
- moved
ApolloError,GraphqlError,ObservableQuery, andQueryResultunderApolloClient.TypesfromApolloClient
Features
- Added a bunch of modules under
ApolloClient.Typesfor easy access
v0.0.1-beta.1
reason-apollo-client
Important!
- Package is now published under
reason-apollo-clientinstead of@jeddeloh/reason-apollo-client
v0.0.1-beta.0
@jeddeloh/reason-apollo-client
Dependency Updates
- Bumped
@apollo/clientdependency to^3.0.0🎉
Features
- Better network error types (see #15 and #11)
- Exposed some error modules on the root module
- Added
watchQuerymethod binding onApolloClient - Added
readQuery,writeQuery, andwriteFragmentApolloCachemethods - Added
fetchMore,refetch,startPolling,stopPolling,subscribeToMoremethods forQueryResultI previously missed
Docs
- Added examples for doing some cache updates
v0.0.1-alpha.4
Docs
- Minor installation instruction improvements
- Minor additions to examples
v0.0.1-alpha.3
Breaking Changes
- Configuration has gotten slimmer!
"graphql": { "extend-mutation": "ApolloClient.GraphQL_PPX.ExtendMutation", - "extend-mutation-no-required-variables": "ApolloClient.GraphQL_PPX.ExtendMutationNoRequiredVariables", "extend-query": "ApolloClient.GraphQL_PPX.ExtendQuery", - "extend-query-no-required-variables": "ApolloClient.GraphQL_PPX.ExtendQueryNoRequiredVariables", "extend-subscription": "ApolloClient.GraphQL_PPX.ExtendSubscription", - "extend-subscription-no-required-variables": "ApolloClient.GraphQL_PPX.ExtendSubscriptionNoRequiredVariables" }, - Variables are now required and have moved to the last positional argument for better type inference in client methods and hooks. This has almost no practical impact on hooks provided on the graphql-ppx modules since they already had a similar shape. Example:
Client.instance ->ApolloClient.mutate( ~mutation=(module ExampleMutation), {required: "variables"}, ) Client.instance ->ApolloClient.query( ~mutation=(module ExampleQueryWithNoVars), (), )