Releases: jeddeloh/rescript-apollo-client
Releases · jeddeloh/rescript-apollo-client
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.t
toJs.Dict.t(TypePolicy.t)
this will be a breaking change.
Features
- Added
makeVar
bindings 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_variables
instead ofRaw.t_variables
. This means you're free to always pass a record for variables andmakeVariables
is a convenience function for passing a subset of optional variables.
Dependencies
- Bumped
graphql-ppx
to v1.0.0-beta.22 - Dropped
@apollol/link-ws
- Dropped
@apollol/link-error
- Dropped
@apollol/link-context
v0.0.1-beta.5
Bugfix
FetchPolicy__noCacheExtracted
was incorrectly typed as the opposite set of possible values
v0.0.1-beta.4
Breaking Changes
ApolloClient.Link.make
now returns anoption
instead ofJs.nullable
setContext
andgetContext
methods pulled into their own functions and off theOperation.t
record
Features
- Added
setLink
method forApolloClient
(useful if you're altering your links after some initialization!)
v0.0.1-beta.3
Breaking Changes
- moved
ApolloError
,GraphqlError
,ObservableQuery
, andQueryResult
underApolloClient.Types
fromApolloClient
Features
- Added a bunch of modules under
ApolloClient.Types
for easy access
v0.0.1-beta.1
reason-apollo-client
Important!
- Package is now published under
reason-apollo-client
instead of@jeddeloh/reason-apollo-client
v0.0.1-beta.0
@jeddeloh/reason-apollo-client
Dependency Updates
- Bumped
@apollo/client
dependency to^3.0.0
🎉
Features
- Better network error types (see #15 and #11)
- Exposed some error modules on the root module
- Added
watchQuery
method binding onApolloClient
- Added
readQuery
,writeQuery
, andwriteFragment
ApolloCache
methods - Added
fetchMore
,refetch
,startPolling
,stopPolling
,subscribeToMore
methods forQueryResult
I 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), (), )
v0.0.1-alpha.2
Breaking Changes
- Switch to using
graphql-ppx
flags to wrap our operations and fragments in the gql template tag rather than doing this internally. Please add the following to your bsconfig!
"ppx-flags": [
[
"@reasonml-community/graphql-ppx/ppx",
+ "-template-tag-return-type=ApolloClient.GraphQL_PPX.templateTagReturnType",
+ "-template-tag-import=gql",
+ "-template-tag-location=@apollo/client"
]
],
Improvements
- Root module is now namespaced as
Jeddeloh__ApolloClient.re
and then included inApolloClient.re
to avoid namespace collisions. See #3 for context