Socket
Socket
Sign inDemoInstall

@apollo/client

Package Overview
Dependencies
Maintainers
4
Versions
575
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo/client - npm Package Compare versions

Comparing version 0.0.0-pr-11757-20240405111250 to 0.0.0-pr-11771-20240409102352

2

dev/dev.cjs.native.js

@@ -431,3 +431,3 @@ 'use strict';

var version = "0.0.0-pr-11757-20240405111250";
var version = "0.0.0-pr-11771-20240409102352";

@@ -434,0 +434,0 @@ function maybe(thunk) {

{
"name": "@apollo/client",
"version": "0.0.0-pr-11757-20240405111250",
"version": "0.0.0-pr-11771-20240409102352",
"description": "A fully-featured caching GraphQL client.",

@@ -5,0 +5,0 @@ "private": false,

@@ -1026,2 +1026,8 @@ 'use strict';

function useQueryRefHandlers(queryRef) {
var unwrapped = internal.unwrapQueryRef(queryRef);
return wrapHook("useQueryRefHandlers", _useQueryRefHandlers, unwrapped ?
unwrapped["observable"]
: useApolloClient())(queryRef);
}
function _useQueryRefHandlers(queryRef) {
var _a = React__namespace.useState(queryRef), previousQueryRef = _a[0], setPreviousQueryRef = _a[1];

@@ -1028,0 +1034,0 @@ var _b = React__namespace.useState(queryRef), wrappedQueryRef = _b[0], setWrappedQueryRef = _b[1];

@@ -1,2 +0,2 @@

import type { useQuery, useSuspenseQuery, useBackgroundQuery, useReadQuery, useFragment } from "../index.js";
import type { useQuery, useSuspenseQuery, useBackgroundQuery, useReadQuery, useFragment, useQueryRefHandlers } from "../index.js";
import type { ApolloClient } from "../../../core/ApolloClient.js";

@@ -10,2 +10,3 @@ import type { ObservableQuery } from "../../../core/ObservableQuery.js";

useFragment: typeof useFragment;
useQueryRefHandlers: typeof useQueryRefHandlers;
}

@@ -12,0 +13,0 @@ /**

import * as React from "rehackt";
import { getWrappedPromise, unwrapQueryRef, updateWrappedQueryRef, wrapQueryRef, } from "../internal/index.js";
import { useApolloClient } from "./useApolloClient.js";
import { wrapHook } from "./internal/index.js";
/**

@@ -23,2 +25,12 @@ * A React hook that returns a `refetch` and `fetchMore` function for a given

export function useQueryRefHandlers(queryRef) {
var unwrapped = unwrapQueryRef(queryRef);
return wrapHook("useQueryRefHandlers", _useQueryRefHandlers, unwrapped ?
unwrapped["observable"]
// in the case of a "transported" queryRef object, we need to use the
// client that's available to us at the current position in the React tree
// that ApolloClient will then have the job to recreate a real queryRef from
// the transported object
: useApolloClient())(queryRef);
}
function _useQueryRefHandlers(queryRef) {
var _a = React.useState(queryRef), previousQueryRef = _a[0], setPreviousQueryRef = _a[1];

@@ -25,0 +37,0 @@ var _b = React.useState(queryRef), wrappedQueryRef = _b[0], setWrappedQueryRef = _b[1];

@@ -7,3 +7,3 @@ 'use strict';

var version = "0.0.0-pr-11757-20240405111250";
var version = "0.0.0-pr-11771-20240409102352";

@@ -10,0 +10,0 @@ function maybe(thunk) {

@@ -1,2 +0,2 @@

export var version = "0.0.0-pr-11757-20240405111250";
export var version = "0.0.0-pr-11771-20240409102352";
//# sourceMappingURL=version.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc