Skip to content

Commit

Permalink
fix: infinite loop when calling stop
Browse files Browse the repository at this point in the history
resolves #164
  • Loading branch information
illusionalsagacity committed Nov 1, 2024
1 parent ea2f9b7 commit cfb87f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/@apollo/client/core/ApolloClient__Core_ApolloClient.res
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ module Js_ = {
@send external setLink: (t, ApolloLink.Js_.t) => unit = "setLink"

// stop(): void;
@send external stop: (t, unit) => unit = "stop"
@send external stop: t => unit = "stop"

// subscribe<T = any, TVariables = OperationVariables>(options: SubscriptionOptions<TVariables>): Observable<FetchResult<T>>;

Expand Down Expand Up @@ -492,6 +492,7 @@ type t = {
restore: (~serializedState: Js.Json.t) => ApolloCache.t<Js.Json.t>,
@as("rescript_setLink")
setLink: ApolloLink.t => unit,
@as("rescript_stop")
stop: unit => unit,
@as("rescript_subscribe")
subscribe: 'data 'variables 'jsVariables. (
Expand Down Expand Up @@ -837,7 +838,7 @@ let make: (

let setLink = link => jsClient->Js_.setLink(link)

let stop = () => jsClient->Js_.stop()
let stop = () => jsClient->Js_.stop

let subscribe = (
type data variables jsVariables,
Expand Down

0 comments on commit cfb87f5

Please sign in to comment.