Skip to content

Releases: jeddeloh/rescript-apollo-client

v0.0.1-beta.7

19 Aug 18:47
Compare
Choose a tag to compare
v0.0.1-beta.7 Pre-release
Pre-release

Breaking Changes

  • Fleshed out types for TypePolicies.t. Unfortunately this is not a zero-cost binding, so if you were previously casting a Js.t to Js.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 above TypePolicies, but I have not tried it

v0.0.1-beta.6

09 Aug 16:48
Compare
Choose a tag to compare
v0.0.1-beta.6 Pre-release
Pre-release

Breaking Changes

  • Hooks and client methods now take t_variables instead of Raw.t_variables. This means you're free to always pass a record for variables and makeVariables 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

01 Aug 16:14
Compare
Choose a tag to compare
v0.0.1-beta.5 Pre-release
Pre-release

Bugfix

  • FetchPolicy__noCacheExtracted was incorrectly typed as the opposite set of possible values

v0.0.1-beta.4

23 Jul 15:06
Compare
Choose a tag to compare
v0.0.1-beta.4 Pre-release
Pre-release

Breaking Changes

  • ApolloClient.Link.make now returns an option instead of Js.nullable
  • setContext and getContext methods pulled into their own functions and off the Operation.t record

Features

  • Added setLink method for ApolloClient (useful if you're altering your links after some initialization!)

v0.0.1-beta.3

22 Jul 01:38
Compare
Choose a tag to compare
v0.0.1-beta.3 Pre-release
Pre-release

Breaking Changes

  • moved ApolloError, GraphqlError, ObservableQuery, and QueryResult under ApolloClient.Types from ApolloClient

Features

  • Added a bunch of modules under ApolloClient.Types for easy access

v0.0.1-beta.1

18 Jul 16:43
Compare
Choose a tag to compare
v0.0.1-beta.1 Pre-release
Pre-release

reason-apollo-client

Important!

  • Package is now published under reason-apollo-client instead of @jeddeloh/reason-apollo-client

v0.0.1-beta.0

18 Jul 15:33
Compare
Choose a tag to compare
v0.0.1-beta.0 Pre-release
Pre-release

@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 on ApolloClient
  • Added readQuery, writeQuery, and writeFragment ApolloCache methods
  • Added fetchMore, refetch, startPolling, stopPolling, subscribeToMore methods for QueryResult I previously missed

Docs

  • Added examples for doing some cache updates

v0.0.1-alpha.4

14 Jul 14:18
Compare
Choose a tag to compare
v0.0.1-alpha.4 Pre-release
Pre-release

Docs

  • Minor installation instruction improvements
  • Minor additions to examples

v0.0.1-alpha.3

10 Jul 14:01
Compare
Choose a tag to compare
v0.0.1-alpha.3 Pre-release
Pre-release

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

08 Jul 22:20
Compare
Choose a tag to compare
v0.0.1-alpha.2 Pre-release
Pre-release

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 in ApolloClient.re to avoid namespace collisions. See #3 for context