Comparing version
@@ -9,6 +9,6 @@ import type { CacheNode } from '../Cache'; | ||
*/ | ||
export declare const resolve: (accessor: GeneratedSchemaObject, selection: Selection, __type: Type['__type']) => string | number | boolean | CacheNode[] | GeneratedSchemaObject | { | ||
export declare const resolve: (accessor: GeneratedSchemaObject, selection: Selection, __type: Type["__type"]) => string | number | boolean | CacheNode[] | GeneratedSchemaObject | { | ||
[k: string]: boolean; | ||
} | null | undefined; | ||
export declare const createUnionAccessor: ({ context, cache, possibleTypes, selection, }: Omit<Meta, 'type'> & { | ||
export declare const createUnionAccessor: ({ context, cache, possibleTypes, selection, }: Omit<Meta, "type"> & { | ||
possibleTypes: readonly string[]; | ||
@@ -15,0 +15,0 @@ }) => { |
@@ -6,3 +6,3 @@ import type { CacheNode, CacheObject } from '.'; | ||
}; | ||
export declare const isNormalizedObjectShell: (value: unknown) => value is NormalizedObjectShell<CacheObject>; | ||
export declare const isNormalizedObjectShell: (value: unknown) => value is NormalizedObjectShell; | ||
export type NormalizatioOptions<TData extends CacheObject = CacheObject> = CacheNormalizationHandler & { | ||
@@ -9,0 +9,0 @@ store: Map<string, NormalizedObjectShell<TData>>; |
@@ -13,4 +13,3 @@ import type { Client as SseClient } from 'graphql-sse'; | ||
export * as useMetaStateHack from '../Helpers/useMetaStateHack'; | ||
export { pick } from '../Utils'; | ||
export type { LegacyClientOptions as LegacyFetchers, LegacyHydrateCache, LegacyHydrateCacheOptions, LegacyInlineResolveOptions, LegacyInlineResolved, LegacyMutate, LegacyMutateHelpers, LegacyPrefetch, LegacyQueryFetcher, LegacyRefetch, LegacyResolveOptions, LegacyResolved, LegacySelection, LegacySubscribeEvents, LegacySubscriptionsClient, LegacyTrack, LegacyTrackCallInfo, LegacyTrackCallType, LegacyTrackOptions, } from './compat/client'; | ||
export type { LegacyClientOptions as LegacyFetchers, LegacyHydrateCache, LegacyHydrateCacheOptions, LegacyInlineResolved, LegacyInlineResolveOptions, LegacyMutate, LegacyMutateHelpers, LegacyPrefetch, LegacyQueryFetcher, LegacyRefetch, LegacyResolved, LegacyResolveOptions, LegacySelection, LegacySubscribeEvents, LegacySubscriptionsClient, LegacyTrack, LegacyTrackCallInfo, LegacyTrackCallType, LegacyTrackOptions, } from './compat/client'; | ||
export type { SchemaContext } from './context'; | ||
@@ -17,0 +16,0 @@ export type { DebugEvent } from './debugger'; |
@@ -19,4 +19,2 @@ 'use strict'; | ||
const useMetaStateHack = require('../Helpers/useMetaStateHack.js'); | ||
require('../Utils/hash.js'); | ||
const pick = require('../Utils/pick.js'); | ||
const resolveSelections = require('./resolveSelections.js'); | ||
@@ -121,3 +119,2 @@ const meta = require('../Accessor/meta.js'); | ||
exports.useMetaStateHack = useMetaStateHack; | ||
exports.pick = pick.pick; | ||
exports.fetchSelections = resolveSelections.fetchSelections; | ||
@@ -124,0 +121,0 @@ exports.subscribeSelections = resolveSelections.subscribeSelections; |
@@ -1,2 +0,2 @@ | ||
import { type BaseGeneratedSchema, type FetchOptions } from '.'; | ||
import type { BaseGeneratedSchema, FetchOptions } from '.'; | ||
import type { Cache } from '../Cache'; | ||
@@ -3,0 +3,0 @@ import type { GQtyError, RetryOptions } from '../Error'; |
@@ -8,15 +8,8 @@ 'use strict'; | ||
const index = require('../Accessor/index.js'); | ||
require('../Cache/index.js'); | ||
require('flatted'); | ||
require('frail-map'); | ||
require('../Utils/hash.js'); | ||
const deferred = require('../Utils/deferred.js'); | ||
const pick = require('../Utils/pick.js'); | ||
require('../Cache/normalization.js'); | ||
const batching = require('./batching.js'); | ||
const context = require('./context.js'); | ||
const resolveSelections = require('./resolveSelections.js'); | ||
const updateCaches = require('./updateCaches.js'); | ||
const deferred = require('../Utils/deferred.js'); | ||
const context = require('./context.js'); | ||
require('just-safe-get'); | ||
require('just-safe-set'); | ||
const batching = require('./batching.js'); | ||
@@ -199,3 +192,3 @@ const pendingQueries = /* @__PURE__ */ new WeakMap(); | ||
if (selections.size > 0) { | ||
promises.push(resolve()); | ||
promises.push(resolve().catch(onError)); | ||
} | ||
@@ -202,0 +195,0 @@ } |
@@ -9,3 +9,9 @@ 'use strict'; | ||
var _a, _b; | ||
if (options === false) { | ||
throw new Error(`Retries are disabled.`); | ||
} | ||
const maxRetries = typeof options === "number" ? options : (_a = typeof options === "object" ? options.maxRetries : void 0) != null ? _a : defaultMaxRetries; | ||
if (maxRetries < 1) { | ||
throw new Error(`Maximum retries must be >= 1`); | ||
} | ||
const retryDelay = (_b = typeof options === "object" ? options.retryDelay : void 0) != null ? _b : defaultRetryDelay; | ||
@@ -12,0 +18,0 @@ const { attemptIndex = 0, onRetry, onLastTry } = state; |
@@ -17,3 +17,2 @@ 'use strict'; | ||
const meta = require('./Accessor/meta.js'); | ||
const pick = require('./Utils/pick.js'); | ||
const resolveSelections = require('./Client/resolveSelections.js'); | ||
@@ -40,3 +39,2 @@ const useMetaStateHack = require('./Helpers/useMetaStateHack.js'); | ||
exports.$meta = meta.$meta; | ||
exports.pick = pick.pick; | ||
exports.fetchSelections = resolveSelections.fetchSelections; | ||
@@ -43,0 +41,0 @@ exports.subscribeSelections = resolveSelections.subscribeSelections; |
{ | ||
"name": "gqty", | ||
"version": "3.1.1", | ||
"description": "gqty client without queries", | ||
"version": "3.1.2-canary-20240710103449.748e1626cec71ea7a90380169064c49ad0a8bfa2", | ||
"description": "The No-GraphQL Client for TypeScript", | ||
"sideEffects": false, | ||
@@ -6,0 +6,0 @@ "peerDependencies": { |
@@ -8,3 +8,3 @@ export type PlainObject = Record<string | number | symbol, unknown>; | ||
} | ||
export declare const isObjectWithType: <T extends ObjectWithType<string>>(v: unknown) => v is T; | ||
export declare const isObjectWithType: <T extends ObjectWithType>(v: unknown) => v is T; | ||
/** | ||
@@ -11,0 +11,0 @@ * Similar to `just-extend(true, ...)` but circular references aware. |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
282397
-0.1%7937
-0.14%1
Infinity%