Skip to content

Commit

Permalink
Merge pull request #165 from illusionalsagacity/fix-infinite-loop
Browse files Browse the repository at this point in the history
fix: infinite loop when calling stop
  • Loading branch information
jeddeloh authored Nov 1, 2024
2 parents ea2f9b7 + cfb87f5 commit 6d9165a
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 6d9165a

Please sign in to comment.