@0no-co/graphql.web
Advanced tools
Comparing version 0.0.0-canary-20230321105032 to 0.0.0-canary-20230324112433
@@ -0,1 +1,5 @@ | ||
/*!@ts-ignore*/ | ||
import * as GraphQL from 'graphql'; | ||
type Or<T, U> = 0 extends 1 & T ? U : T; | ||
type Maybe<T> = T | undefined | null; | ||
@@ -83,4 +87,4 @@ interface Extensions { | ||
/** Type System Definition */ | ||
declare type TypeSystemDefinitionNode = SchemaDefinitionNode | TypeDefinitionNode | DirectiveDefinitionNode; | ||
interface SchemaDefinitionNode { | ||
declare type TypeSystemDefinitionNode = Or<GraphQL.TypeSystemDefinitionNode, SchemaDefinitionNode | TypeDefinitionNode | DirectiveDefinitionNode>; | ||
type SchemaDefinitionNode = Or<GraphQL.SchemaDefinitionNode, { | ||
readonly kind: Kind.SCHEMA_DEFINITION; | ||
@@ -91,4 +95,4 @@ readonly loc?: Location; | ||
readonly operationTypes: ReadonlyArray<OperationTypeDefinitionNode>; | ||
} | ||
interface OperationTypeDefinitionNode { | ||
}>; | ||
type OperationTypeDefinitionNode = Or<GraphQL.OperationTypeDefinitionNode, { | ||
readonly kind: Kind.OPERATION_TYPE_DEFINITION; | ||
@@ -98,6 +102,6 @@ readonly loc?: Location; | ||
readonly type: NamedTypeNode; | ||
} | ||
}>; | ||
/** Type Definition */ | ||
declare type TypeDefinitionNode = ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode; | ||
interface ScalarTypeDefinitionNode { | ||
declare type TypeDefinitionNode = Or<GraphQL.TypeDefinitionNode, ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode>; | ||
type ScalarTypeDefinitionNode = Or<GraphQL.ScalarTypeDefinitionNode, { | ||
readonly kind: Kind.SCALAR_TYPE_DEFINITION; | ||
@@ -108,4 +112,4 @@ readonly loc?: Location; | ||
readonly directives?: ReadonlyArray<ConstDirectiveNode>; | ||
} | ||
interface ObjectTypeDefinitionNode { | ||
}>; | ||
type ObjectTypeDefinitionNode = Or<GraphQL.ObjectTypeDefinitionNode, { | ||
readonly kind: Kind.OBJECT_TYPE_DEFINITION; | ||
@@ -118,4 +122,4 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<FieldDefinitionNode>; | ||
} | ||
interface FieldDefinitionNode { | ||
}>; | ||
type FieldDefinitionNode = Or<GraphQL.FieldDefinitionNode, { | ||
readonly kind: Kind.FIELD_DEFINITION; | ||
@@ -128,4 +132,4 @@ readonly loc?: Location; | ||
readonly directives?: ReadonlyArray<ConstDirectiveNode>; | ||
} | ||
interface InputValueDefinitionNode { | ||
}>; | ||
type InputValueDefinitionNode = Or<GraphQL.InputValueDefinitionNode, { | ||
readonly kind: Kind.INPUT_VALUE_DEFINITION; | ||
@@ -138,4 +142,4 @@ readonly loc?: Location; | ||
readonly directives?: ReadonlyArray<ConstDirectiveNode>; | ||
} | ||
interface InterfaceTypeDefinitionNode { | ||
}>; | ||
type InterfaceTypeDefinitionNode = Or<GraphQL.InterfaceTypeDefinitionNode, { | ||
readonly kind: Kind.INTERFACE_TYPE_DEFINITION; | ||
@@ -148,4 +152,4 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<FieldDefinitionNode>; | ||
} | ||
interface UnionTypeDefinitionNode { | ||
}>; | ||
type UnionTypeDefinitionNode = Or<GraphQL.UnionTypeDefinitionNode, { | ||
readonly kind: Kind.UNION_TYPE_DEFINITION; | ||
@@ -157,4 +161,4 @@ readonly loc?: Location; | ||
readonly types?: ReadonlyArray<NamedTypeNode>; | ||
} | ||
interface EnumTypeDefinitionNode { | ||
}>; | ||
type EnumTypeDefinitionNode = Or<GraphQL.EnumTypeDefinitionNode, { | ||
readonly kind: Kind.ENUM_TYPE_DEFINITION; | ||
@@ -166,4 +170,4 @@ readonly loc?: Location; | ||
readonly values?: ReadonlyArray<EnumValueDefinitionNode>; | ||
} | ||
interface EnumValueDefinitionNode { | ||
}>; | ||
type EnumValueDefinitionNode = Or<GraphQL.EnumValueDefinitionNode, { | ||
readonly kind: Kind.ENUM_VALUE_DEFINITION; | ||
@@ -174,4 +178,4 @@ readonly loc?: Location; | ||
readonly directives?: ReadonlyArray<ConstDirectiveNode>; | ||
} | ||
interface InputObjectTypeDefinitionNode { | ||
}>; | ||
type InputObjectTypeDefinitionNode = Or<GraphQL.InputObjectTypeDefinitionNode, { | ||
readonly kind: Kind.INPUT_OBJECT_TYPE_DEFINITION; | ||
@@ -183,5 +187,4 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<InputValueDefinitionNode>; | ||
} | ||
/** Directive Definitions */ | ||
interface DirectiveDefinitionNode { | ||
}>; | ||
type DirectiveDefinitionNode = Or<GraphQL.DirectiveDefinitionNode, { | ||
readonly kind: Kind.DIRECTIVE_DEFINITION; | ||
@@ -194,6 +197,5 @@ readonly loc?: Location; | ||
readonly locations: ReadonlyArray<NameNode>; | ||
} | ||
/** Type System Extensions */ | ||
declare type TypeSystemExtensionNode = SchemaExtensionNode | TypeExtensionNode; | ||
interface SchemaExtensionNode { | ||
}>; | ||
type TypeSystemExtensionNode = Or<GraphQL.TypeSystemExtensionNode, SchemaExtensionNode | TypeExtensionNode>; | ||
type SchemaExtensionNode = Or<GraphQL.SchemaExtensionNode, { | ||
readonly kind: Kind.SCHEMA_EXTENSION; | ||
@@ -203,6 +205,5 @@ readonly loc?: Location; | ||
readonly operationTypes?: ReadonlyArray<OperationTypeDefinitionNode>; | ||
} | ||
/** Type Extensions */ | ||
declare type TypeExtensionNode = ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode; | ||
interface ScalarTypeExtensionNode { | ||
}>; | ||
declare type TypeExtensionNode = Or<GraphQL.TypeExtensionNode, ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode>; | ||
type ScalarTypeExtensionNode = Or<GraphQL.ScalarTypeExtensionNode, { | ||
readonly kind: Kind.SCALAR_TYPE_EXTENSION; | ||
@@ -212,4 +213,4 @@ readonly loc?: Location; | ||
readonly directives?: ReadonlyArray<ConstDirectiveNode>; | ||
} | ||
interface ObjectTypeExtensionNode { | ||
}>; | ||
type ObjectTypeExtensionNode = Or<GraphQL.ObjectTypeExtensionNode, { | ||
readonly kind: Kind.OBJECT_TYPE_EXTENSION; | ||
@@ -221,4 +222,4 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<FieldDefinitionNode>; | ||
} | ||
interface InterfaceTypeExtensionNode { | ||
}>; | ||
type InterfaceTypeExtensionNode = Or<GraphQL.InterfaceTypeExtensionNode, { | ||
readonly kind: Kind.INTERFACE_TYPE_EXTENSION; | ||
@@ -230,4 +231,4 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<FieldDefinitionNode>; | ||
} | ||
interface UnionTypeExtensionNode { | ||
}>; | ||
type UnionTypeExtensionNode = Or<GraphQL.UnionTypeExtensionNode, { | ||
readonly kind: Kind.UNION_TYPE_EXTENSION; | ||
@@ -238,4 +239,4 @@ readonly loc?: Location; | ||
readonly types?: ReadonlyArray<NamedTypeNode>; | ||
} | ||
interface EnumTypeExtensionNode { | ||
}>; | ||
type EnumTypeExtensionNode = Or<GraphQL.EnumTypeExtensionNode, { | ||
readonly kind: Kind.ENUM_TYPE_EXTENSION; | ||
@@ -246,4 +247,4 @@ readonly loc?: Location; | ||
readonly values?: ReadonlyArray<EnumValueDefinitionNode>; | ||
} | ||
interface InputObjectTypeExtensionNode { | ||
}>; | ||
type InputObjectTypeExtensionNode = Or<GraphQL.InputObjectTypeExtensionNode, { | ||
readonly kind: Kind.INPUT_OBJECT_TYPE_EXTENSION; | ||
@@ -254,18 +255,18 @@ readonly loc?: Location; | ||
readonly fields?: ReadonlyArray<InputValueDefinitionNode>; | ||
} | ||
}>; | ||
type ASTNode = NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | NamedTypeNode | ListTypeNode | NonNullTypeNode | SchemaDefinitionNode | OperationTypeDefinitionNode | ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | EnumValueDefinitionNode | InputObjectTypeDefinitionNode | DirectiveDefinitionNode | SchemaExtensionNode | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode; | ||
interface NameNode { | ||
type ASTNode = Or<GraphQL.ASTNode, NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | NamedTypeNode | ListTypeNode | NonNullTypeNode | SchemaDefinitionNode | OperationTypeDefinitionNode | ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | EnumValueDefinitionNode | InputObjectTypeDefinitionNode | DirectiveDefinitionNode | SchemaExtensionNode | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode>; | ||
type NameNode = Or<GraphQL.NameNode, { | ||
readonly kind: Kind.NAME; | ||
readonly value: string; | ||
readonly loc?: Location; | ||
} | ||
interface DocumentNode { | ||
}>; | ||
type DocumentNode = Or<GraphQL.DocumentNode, { | ||
readonly kind: Kind.DOCUMENT; | ||
readonly definitions: ReadonlyArray<DefinitionNode>; | ||
readonly loc?: Location; | ||
} | ||
type DefinitionNode = ExecutableDefinitionNode | TypeSystemDefinitionNode | TypeSystemExtensionNode; | ||
type ExecutableDefinitionNode = OperationDefinitionNode | FragmentDefinitionNode; | ||
interface OperationDefinitionNode { | ||
}>; | ||
type DefinitionNode = Or<GraphQL.DefinitionNode, ExecutableDefinitionNode | TypeSystemDefinitionNode | TypeSystemExtensionNode>; | ||
type ExecutableDefinitionNode = Or<GraphQL.ExecutableDefinitionNode, OperationDefinitionNode | FragmentDefinitionNode>; | ||
type OperationDefinitionNode = Or<GraphQL.OperationDefinitionNode, { | ||
readonly kind: Kind.OPERATION_DEFINITION; | ||
@@ -278,4 +279,4 @@ readonly operation: OperationTypeNode; | ||
readonly loc?: Location; | ||
} | ||
interface VariableDefinitionNode { | ||
}>; | ||
type VariableDefinitionNode = Or<GraphQL.VariableDefinitionNode, { | ||
readonly kind: Kind.VARIABLE_DEFINITION; | ||
@@ -287,15 +288,15 @@ readonly variable: VariableNode; | ||
readonly loc?: Location; | ||
} | ||
interface VariableNode { | ||
}>; | ||
type VariableNode = Or<GraphQL.VariableNode, { | ||
readonly kind: Kind.VARIABLE; | ||
readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface SelectionSetNode { | ||
}>; | ||
type SelectionSetNode = Or<GraphQL.SelectionSetNode, { | ||
readonly kind: Kind.SELECTION_SET; | ||
readonly selections: ReadonlyArray<SelectionNode>; | ||
readonly loc?: Location; | ||
} | ||
declare type SelectionNode = FieldNode | FragmentSpreadNode | InlineFragmentNode; | ||
interface FieldNode { | ||
}>; | ||
declare type SelectionNode = Or<GraphQL.SelectionNode, FieldNode | FragmentSpreadNode | InlineFragmentNode>; | ||
type FieldNode = Or<GraphQL.FieldNode, { | ||
readonly kind: Kind.FIELD; | ||
@@ -308,4 +309,4 @@ readonly alias?: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface ArgumentNode { | ||
}>; | ||
type ArgumentNode = Or<GraphQL.ArgumentNode, { | ||
readonly kind: Kind.ARGUMENT; | ||
@@ -315,4 +316,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface ConstArgumentNode { | ||
}>; | ||
type ConstArgumentNode = Or<GraphQL.ConstArgumentNode, { | ||
readonly kind: Kind.ARGUMENT; | ||
@@ -322,4 +323,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface FragmentSpreadNode { | ||
}>; | ||
type FragmentSpreadNode = Or<GraphQL.FragmentSpreadNode, { | ||
readonly kind: Kind.FRAGMENT_SPREAD; | ||
@@ -329,4 +330,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface InlineFragmentNode { | ||
}>; | ||
type InlineFragmentNode = Or<GraphQL.InlineFragmentNode, { | ||
readonly kind: Kind.INLINE_FRAGMENT; | ||
@@ -337,4 +338,4 @@ readonly typeCondition?: NamedTypeNode; | ||
readonly loc?: Location; | ||
} | ||
interface FragmentDefinitionNode { | ||
}>; | ||
type FragmentDefinitionNode = Or<GraphQL.FragmentDefinitionNode, { | ||
readonly kind: Kind.FRAGMENT_DEFINITION; | ||
@@ -346,16 +347,16 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
type ValueNode = VariableNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode; | ||
type ConstValueNode = IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ConstListValueNode | ConstObjectValueNode; | ||
interface IntValueNode { | ||
}>; | ||
type ValueNode = Or<GraphQL.ValueNode, VariableNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode>; | ||
type ConstValueNode = Or<GraphQL.ConstValueNode, IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ConstListValueNode | ConstObjectValueNode>; | ||
type IntValueNode = Or<GraphQL.IntValueNode, { | ||
readonly kind: Kind.INT; | ||
readonly value: string; | ||
readonly loc?: Location; | ||
} | ||
interface FloatValueNode { | ||
}>; | ||
type FloatValueNode = Or<GraphQL.FloatValueNode, { | ||
readonly kind: Kind.FLOAT; | ||
readonly value: string; | ||
readonly loc?: Location; | ||
} | ||
interface StringValueNode { | ||
}>; | ||
type StringValueNode = Or<GraphQL.FloatValueNode, { | ||
readonly kind: Kind.STRING; | ||
@@ -365,38 +366,38 @@ readonly value: string; | ||
readonly loc?: Location; | ||
} | ||
interface BooleanValueNode { | ||
}>; | ||
type BooleanValueNode = Or<GraphQL.BooleanValueNode, { | ||
readonly kind: Kind.BOOLEAN; | ||
readonly value: boolean; | ||
readonly loc?: Location; | ||
} | ||
interface NullValueNode { | ||
}>; | ||
type NullValueNode = Or<GraphQL.NullValueNode, { | ||
readonly kind: Kind.NULL; | ||
readonly loc?: Location; | ||
} | ||
interface EnumValueNode { | ||
}>; | ||
type EnumValueNode = Or<GraphQL.EnumValueNode, { | ||
readonly kind: Kind.ENUM; | ||
readonly value: string; | ||
readonly loc?: Location; | ||
} | ||
interface ListValueNode { | ||
}>; | ||
type ListValueNode = Or<GraphQL.ListValueNode, { | ||
readonly kind: Kind.LIST; | ||
readonly values: ReadonlyArray<ValueNode>; | ||
readonly loc?: Location; | ||
} | ||
interface ConstListValueNode { | ||
}>; | ||
type ConstListValueNode = Or<GraphQL.ConstListValueNode, { | ||
readonly kind: Kind.LIST; | ||
readonly values: ReadonlyArray<ConstValueNode>; | ||
readonly loc?: Location; | ||
} | ||
interface ObjectValueNode { | ||
}>; | ||
type ObjectValueNode = Or<GraphQL.ObjectValueNode, { | ||
readonly kind: Kind.OBJECT; | ||
readonly fields: ReadonlyArray<ObjectFieldNode>; | ||
readonly loc?: Location; | ||
} | ||
interface ConstObjectValueNode { | ||
}>; | ||
type ConstObjectValueNode = Or<GraphQL.ConstObjectValueNode, { | ||
readonly kind: Kind.OBJECT; | ||
readonly fields: ReadonlyArray<ConstObjectFieldNode>; | ||
readonly loc?: Location; | ||
} | ||
interface ObjectFieldNode { | ||
}>; | ||
type ObjectFieldNode = Or<GraphQL.ObjectFieldNode, { | ||
readonly kind: Kind.OBJECT_FIELD; | ||
@@ -406,4 +407,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface ConstObjectFieldNode { | ||
}>; | ||
type ConstObjectFieldNode = Or<GraphQL.ConstObjectFieldNode, { | ||
readonly kind: Kind.OBJECT_FIELD; | ||
@@ -413,4 +414,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface DirectiveNode { | ||
}>; | ||
type DirectiveNode = Or<GraphQL.DirectiveNode, { | ||
readonly kind: Kind.DIRECTIVE; | ||
@@ -420,4 +421,4 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface ConstDirectiveNode { | ||
}>; | ||
type ConstDirectiveNode = Or<GraphQL.ConstDirectiveNode, { | ||
readonly kind: Kind.DIRECTIVE; | ||
@@ -427,19 +428,19 @@ readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
declare type TypeNode = NamedTypeNode | ListTypeNode | NonNullTypeNode; | ||
interface NamedTypeNode { | ||
}>; | ||
type TypeNode = Or<GraphQL.TypeNode, NamedTypeNode | ListTypeNode | NonNullTypeNode>; | ||
type NamedTypeNode = Or<GraphQL.NamedTypeNode, { | ||
readonly kind: Kind.NAMED_TYPE; | ||
readonly name: NameNode; | ||
readonly loc?: Location; | ||
} | ||
interface ListTypeNode { | ||
}>; | ||
type ListTypeNode = Or<GraphQL.ListTypeNode, { | ||
readonly kind: Kind.LIST_TYPE; | ||
readonly type: TypeNode; | ||
readonly loc?: Location; | ||
} | ||
interface NonNullTypeNode { | ||
}>; | ||
type NonNullTypeNode = Or<GraphQL.NonNullTypeNode, { | ||
readonly kind: Kind.NON_NULL_TYPE; | ||
readonly type: NamedTypeNode | ListTypeNode; | ||
readonly loc?: Location; | ||
} | ||
}>; | ||
@@ -446,0 +447,0 @@ declare class GraphQLError extends Error { |
{ | ||
"name": "@0no-co/graphql.web", | ||
"description": "A spec-compliant client-side GraphQL implementation", | ||
"version": "0.0.0-canary-20230321105032", | ||
"version": "0.0.0-canary-20230324112433", | ||
"author": "0no.co <hi@0no.co>", | ||
@@ -10,2 +10,3 @@ "source": "./src/index.ts", | ||
"types": "./dist/graphql.web.d.ts", | ||
"sideEffects": false, | ||
"files": [ | ||
@@ -25,3 +26,10 @@ "LICENSE", | ||
}, | ||
"sideEffects": false, | ||
"peerDependencies": { | ||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"graphql": { | ||
"optional": true | ||
} | ||
}, | ||
"public": true, | ||
@@ -28,0 +36,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152091
1