Socket
Socket
Sign inDemoInstall

@graphql-typed-document-node/core

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-typed-document-node/core - npm Package Compare versions

Comparing version 3.1.2-alpha-20230205022655-fa2a421 to 3.2.0-alpha-20230205023330-f05a940

4

package.json
{
"name": "@graphql-typed-document-node/core",
"version": "3.1.2-alpha-20230205022655-fa2a421",
"version": "3.2.0-alpha-20230205023330-f05a940",
"peerDependencies": {
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
},

@@ -7,0 +7,0 @@ "repository": "git@github.com:dotansimha/graphql-typed-document-node.git",

import type { DocumentNode } from "graphql";
export type OperationResultType = "stream" | "single";
export interface TypedDocumentNode<Result = {

@@ -6,3 +7,3 @@ [key: string]: any;

[key: string]: any;
}> extends DocumentNode {
}, ResultType extends OperationResultType = any> extends DocumentNode {
/**

@@ -13,3 +14,3 @@ * This type is used to ensure that the variables you pass in to the query are assignable to Variables

*/
__apiType?: (variables: Variables) => Result;
__apiType?: (variables: Variables, resultType: ResultType) => Result;
}

@@ -22,3 +23,3 @@ /**

*/
export type ResultOf<T> = T extends TypedDocumentNode<infer ResultType, infer VariablesType> ? ResultType : never;
export type ResultOf<T> = T extends TypedDocumentNode<infer ResultType, any> ? ResultType : never;
/**

@@ -30,2 +31,9 @@ * Helper for extracting a TypeScript type for operation variables from a TypedDocumentNode.

*/
export type VariablesOf<T> = T extends TypedDocumentNode<infer ResultType, infer VariablesType> ? VariablesType : never;
export type VariablesOf<T> = T extends TypedDocumentNode<any, infer VariablesType> ? VariablesType : never;
/**
* Helper for extracting a TypeScript type for operation type from a TypedDocumentNode.
* @example
* const myQuery = { ... }; // TypedDocumentNode<R, V, O>
* type OperationType = VariablesOf<typeof myQuery>; // Now it's O
*/
export type OperationTypeOf<T> = T extends TypedDocumentNode<any, any, infer OperationType> ? OperationType : never;
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