From e871515bc75fb5d1af32dbde3094ed6709c8126c Mon Sep 17 00:00:00 2001 From: Rob Date: Sun, 20 Oct 2024 12:53:39 -0400 Subject: [PATCH] fix: LazyQueryResult.Js_.classify was checking the wrong value resolves #161 --- src/@apollo/client/react/types/ApolloClient__React_Types.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@apollo/client/react/types/ApolloClient__React_Types.res b/src/@apollo/client/react/types/ApolloClient__React_Types.res index fb04961..83ae4fa 100644 --- a/src/@apollo/client/react/types/ApolloClient__React_Types.res +++ b/src/@apollo/client/react/types/ApolloClient__React_Types.res @@ -572,7 +572,7 @@ module LazyQueryResult = { | UnexecutedLazyResult(UnexecutedLazyResult.Js_.t) | QueryResult(QueryResult.Js_.t<'jsData, 'jsVariables>) let classify = (Any(v): t): case<'jsData, 'jsVariables> => - if %raw(`function (value) { return "client" in value}`)(v) { + if %raw(`function (value) { return "called" in value && value.called === true; }`)(v) { QueryResult((Obj.magic(v): QueryResult.Js_.t<'jsData, 'jsVariables>)) } else { UnexecutedLazyResult((Obj.magic(v): UnexecutedLazyResult.Js_.t))