New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/relay-runtime

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/relay-runtime - npm Package Compare versions

Comparing version 10.1.5 to 10.1.6

11

relay-runtime/index.d.ts

@@ -37,2 +37,5 @@ // Type definitions for relay-runtime 10.1

PayloadError,
ReactFlightPayloadData,
ReactFlightPayloadQuery,
ReactFlightServerTree,
SubscribeFunction,

@@ -66,2 +69,3 @@ Uploadable,

NormalizationSelector,
OperationAvailability,
OperationDescriptor,

@@ -76,2 +80,4 @@ OperationLoader,

PublishQueue,
ReactFlightPayloadDeserializer,
ReactFlightClientResponse,
ReaderSelector,

@@ -96,2 +102,3 @@ ReadOnlyRecordProxy,

NormalizationField,
NormalizationFlightField,
NormalizationLinkedField,

@@ -110,4 +117,4 @@ NormalizationLinkedHandle,

ReaderArgumentDefinition,
ReaderConnection,
ReaderField,
ReaderFlightField,
ReaderFragment,

@@ -121,4 +128,6 @@ ReaderInlineDataFragment,

ReaderRefetchMetadata,
ReaderRequiredField,
ReaderScalarField,
ReaderSelection,
RequiredFieldAction,
} from './lib/util/ReaderNode';

@@ -125,0 +134,0 @@ export { ConcreteRequest, GeneratedNode, RequestParameters } from './lib/util/RelayConcreteNode';

@@ -114,1 +114,23 @@ import { RequestParameters } from '../util/RelayConcreteNode';

}
/**
* React Flight tree created on the server.
*/
export type ReactFlightServerTree = any;
export interface ReactFlightPayloadQuery {
readonly id: any;
readonly module: any;
readonly response: GraphQLSingularResponse;
readonly variables: Variables;
}
/**
* Data that is returned by a Flight compliant GraphQL server.
*
* - tree: an array of values that will be iterated and fed into
* ReactFlightDOMRelayClient.
* - queries: an array of queries that the server preloaded for the client.
*/
export interface ReactFlightPayloadData {
readonly tree: ReactFlightServerTree[];
readonly queries: ReactFlightPayloadQuery[];
}

35

relay-runtime/lib/store/RelayModernQueryExecutor.d.ts

@@ -7,3 +7,5 @@ import {

PublishQueue,
ReactFlightPayloadDeserializer,
SelectorStoreUpdater,
Store,
} from './RelayStoreTypes';

@@ -14,13 +16,20 @@ import { GraphQLResponse } from '../network/RelayNetworkTypes';

export type ActiveState = 'active' | 'inactive';
export interface ExecuteConfig {
getDataID: GetDataID;
operation: OperationDescriptor;
operationLoader: OperationLoader;
operationTracker?: OperationTracker;
optimisticConfig: OptimisticResponseConfig;
publishQueue: PublishQueue;
scheduler?: TaskScheduler;
sink: Sink<GraphQLResponse>;
source: RelayObservable<GraphQLResponse>;
updater?: SelectorStoreUpdater;
readonly getDataID: GetDataID;
readonly treatMissingFieldsAsNull: boolean;
readonly operation: OperationDescriptor;
readonly operationExecutions: Map<string, ActiveState>;
readonly operationLoader: OperationLoader | null | undefined;
readonly operationTracker?: OperationTracker | null;
readonly optimisticConfig: OptimisticResponseConfig | null | undefined;
readonly publishQueue: PublishQueue;
readonly reactFlightPayloadDeserializer?: ReactFlightPayloadDeserializer | null;
readonly scheduler?: TaskScheduler | null;
readonly sink: Sink<GraphQLResponse>;
readonly source: RelayObservable<GraphQLResponse>;
readonly store: Store;
readonly updater?: SelectorStoreUpdater | null;
readonly isClientPayload?: boolean;
}

@@ -32,1 +41,7 @@

}
export interface Executor {
cancel: () => void;
}
export function execute(config: ExecuteConfig): Executor;

@@ -1,1 +0,21 @@

export type RecordState = 'EXISTENT' | 'NONEXISTENT' | 'UNKNOWN';
declare enum RelayRecordState {
/**
* Record exists (either fetched from the server or produced by a local,
* optimistic update).
*/
EXISTENT = 'EXISTENT',
/**
* Record is known not to exist (either as the result of a mutation, or
* because the server returned `null` when queried for the record).
*/
NONEXISTENT = 'NONEXISTENT',
/**
* Record State is unknown because it has not yet been fetched from the
* server.
*/
UNKNOWN = 'UNKNOWN',
}
export type RecordState = keyof typeof RelayRecordState;
export default RelayRecordState;

@@ -11,3 +11,10 @@ import { ReaderFragment } from '../util/ReaderNode';

} from '../util/NormalizationNode';
import { PayloadData, Network, UploadableMap, PayloadError, GraphQLResponse } from '../network/RelayNetworkTypes';
import {
PayloadData,
Network,
UploadableMap,
PayloadError,
GraphQLResponse,
ReactFlightServerTree,
} from '../network/RelayNetworkTypes';
import { RelayObservable } from '../network/RelayObservable';

@@ -438,30 +445,30 @@ import { RelayOperationTracker } from './RelayOperationTracker';

| Readonly<{
name: 'network.info',
transactionID: number,
info: unknown,
}>
name: 'network.info';
transactionID: number;
info: unknown;
}>
| Readonly<{
name: 'network.start',
transactionID: number,
params: RequestParameters,
variables: Variables,
}>
name: 'network.start';
transactionID: number;
params: RequestParameters;
variables: Variables;
}>
| Readonly<{
name: 'network.next',
transactionID: number,
response: GraphQLResponse,
}>
name: 'network.next';
transactionID: number;
response: GraphQLResponse;
}>
| Readonly<{
name: 'network.error',
transactionID: number,
error: Error,
}>
name: 'network.error';
transactionID: number;
error: Error;
}>
| Readonly<{
name: 'network.complete',
transactionID: number,
}>
name: 'network.complete';
transactionID: number;
}>
| Readonly<{
name: 'network.unsubscribe',
transactionID: number,
}>
name: 'network.unsubscribe';
transactionID: number;
}>
| Readonly<{

@@ -912,1 +919,16 @@ name: 'store.publish';

}
/**
* ReactFlightDOMRelayClient processes a ReactFlightServerTree into a
* ReactFlightClientResponse object. readRoot() can suspend.
*/
export interface ReactFlightClientResponse {
readRoot: () => any;
}
export interface ReactFlightReachableQuery {
readonly module: any;
readonly variables: Variables;
}
export type ReactFlightPayloadDeserializer = (tree: ReactFlightServerTree) => ReactFlightClientResponse;

@@ -12,7 +12,7 @@ export type NormalizationArgument = NormalizationLiteral | NormalizationVariable;

export interface NormalizationClientExtension {
kind: string; // 'ClientExtension';
selections: ReadonlyArray<NormalizationSelection>;
readonly kind: string; // 'ClientExtension';
readonly selections: ReadonlyArray<NormalizationSelection>;
}
export type NormalizationField = NormalizationScalarField | NormalizationLinkedField | NormalizationMatchField;
export type NormalizationField = NormalizationFlightField | NormalizationScalarField | NormalizationLinkedField;

@@ -30,16 +30,2 @@ export interface NormalizationLinkedField {

export interface NormalizationMatchField {
readonly kind: string; // 'MatchField';
readonly alias: string | null | undefined;
readonly name: string;
readonly storageKey: string | null | undefined;
readonly args: ReadonlyArray<NormalizationArgument>;
readonly matchesByType: {
readonly [key: string]: {
readonly fragmentPropName: string;
readonly fragmentName: string;
};
};
}
export interface NormalizationOperation {

@@ -60,2 +46,10 @@ readonly kind: string; // 'Operation';

export interface NormalizationFlightField {
readonly kind: string; // 'FlightField';
readonly alias: string | null | undefined;
readonly name: string;
readonly args: ReadonlyArray<NormalizationArgument> | null | undefined;
readonly storageKey: string | null | undefined;
}
export interface NormalizationTypeDiscriminator {

@@ -71,2 +65,3 @@ readonly kind: string; // 'TypeDiscriminator';

| NormalizationField
| NormalizationFlightField
| NormalizationHandle

@@ -108,21 +103,21 @@ | NormalizationInlineFragment

export interface NormalizationConnection {
kind: string;
label: string;
name: string;
args: ReadonlyArray<NormalizationArgument>;
edges: NormalizationLinkedField;
pageInfo: NormalizationLinkedField;
readonly kind: string;
readonly label: string;
readonly name: string;
readonly args: ReadonlyArray<NormalizationArgument>;
readonly edges: NormalizationLinkedField;
readonly pageInfo: NormalizationLinkedField;
}
export interface NormalizationLocalArgumentDefinition {
kind: string;
name: string;
defaultValue: any;
readonly kind: string;
readonly name: string;
readonly defaultValue: any;
}
export interface NormalizationModuleImport {
kind: string;
documentName: string;
fragmentPropName: string;
fragmentName: string;
readonly kind: string;
readonly documentName: string;
readonly fragmentPropName: string;
readonly fragmentName: string;
}

@@ -129,0 +124,0 @@

@@ -8,3 +8,3 @@ import { ConnectionMetadata } from '../handlers/connection/ConnectionHandler';

export type ReaderField = ReaderScalarField | ReaderLinkedField | ReaderMatchField;
export type ReaderField = ReaderScalarField | ReaderLinkedField;

@@ -45,16 +45,2 @@ export interface ReaderFragment {

export interface ReaderMatchField {
readonly kind: string; // 'MatchField';
readonly alias: string | null | undefined;
readonly name: string;
readonly storageKey: string | null | undefined;
readonly args: ReadonlyArray<ReaderArgument> | null | undefined;
readonly matchesByType: {
readonly [key: string]: {
readonly fragmentPropName: string;
readonly fragmentName: string;
};
};
}
export interface ReaderPaginationMetadata {

@@ -87,9 +73,41 @@ readonly backward: {

export interface ReaderFlightField {
readonly kind: string; // 'FlightField',
readonly alias: string | null | undefined;
readonly name: string;
readonly args: ReadonlyArray<ReaderArgument> | null | undefined;
readonly storageKey: string | null | undefined;
}
export interface ReaderDefer {
readonly kind: string; // 'Defer',
readonly selections: ReadonlyArray<ReaderSelection>;
}
export interface ReaderStream {
readonly kind: string; // 'Stream',
readonly selections: ReadonlyArray<ReaderSelection>;
}
export type RequiredFieldAction = 'NONE' | 'LOG' | 'THROW';
export interface ReaderRequiredField {
readonly kind: string; // 'RequiredField'
readonly field: ReaderField;
readonly action: RequiredFieldAction;
readonly path: string;
}
export type ReaderSelection =
| ReaderCondition
| ReaderClientExtension
| ReaderDefer
| ReaderField
| ReaderFlightField
| ReaderFragmentSpread
| ReaderInlineDataFragmentSpread
| ReaderInlineFragment
| ReaderMatchField;
| ReaderModuleImport
| ReaderStream
| ReaderRequiredField;

@@ -96,0 +114,0 @@ export interface ReaderSplitOperation {

{
"name": "@types/relay-runtime",
"version": "10.1.5",
"version": "10.1.6",
"description": "TypeScript definitions for relay-runtime",

@@ -37,4 +37,4 @@ "license": "MIT",

"dependencies": {},
"typesPublisherContentHash": "a0f56f0a972cf587324e7d1168735a5194482299f3fc4d133c6e7bb319257db0",
"typesPublisherContentHash": "bfdb6894bb853e61e478b6629d1376f14012da4eeb35db22b052cf3c6e7b6607",
"typeScriptVersion": "3.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 16 Dec 2020 12:25:08 GMT
* Last updated: Thu, 24 Dec 2020 01:25:27 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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