Comparing version 1.2.0 to 1.2.1-canary-cdd6370518407296c4307597b1f0df703a5091fd
@@ -1166,50 +1166,58 @@ import { Kind, OperationTypeNode, DocumentNode } from '@0no-co/graphql.web'; | ||
}, | ||
SelectionAcc = {}, | ||
> = Selections extends [infer Node, ...infer Rest] | ||
? (Node extends { | ||
kind: Kind.FRAGMENT_SPREAD | Kind.INLINE_FRAGMENT; | ||
} | ||
? getSpreadSubtype<Node, Type, Introspection, Fragments> extends infer Subtype extends | ||
ObjectLikeType | ||
? PossibleType extends getTypenameOfType<Subtype> | ||
? | ||
| (isOptional<Node> extends true ? {} : never) | ||
| getFragmentSelection<Node, Subtype, Introspection, Fragments> | ||
: {} | ||
? _getPossibleTypeSelectionRec< | ||
Rest, | ||
PossibleType, | ||
Type, | ||
Introspection, | ||
Fragments, | ||
(Node extends { | ||
kind: Kind.FRAGMENT_SPREAD | Kind.INLINE_FRAGMENT; | ||
} | ||
? getSpreadSubtype<Node, Type, Introspection, Fragments> extends infer Subtype extends | ||
ObjectLikeType | ||
? PossibleType extends getTypenameOfType<Subtype> | ||
? | ||
| (isOptional<Node> extends true ? {} : never) | ||
| getFragmentSelection<Node, Subtype, Introspection, Fragments> | ||
: {} | ||
: Node extends { | ||
kind: Kind.FRAGMENT_SPREAD; | ||
name: any; | ||
} | ||
? makeUndefinedFragmentRef<Node['name']['value']> | ||
: {} | ||
: Node extends { | ||
kind: Kind.FRAGMENT_SPREAD; | ||
kind: Kind.FIELD; | ||
name: any; | ||
selectionSet: any; | ||
} | ||
? makeUndefinedFragmentRef<Node['name']['value']> | ||
: {} | ||
: Node extends { | ||
kind: Kind.FIELD; | ||
name: any; | ||
selectionSet: any; | ||
} | ||
? isOptional<Node> extends true | ||
? { | ||
[Prop in getFieldAlias<Node>]?: Node['name']['value'] extends '__typename' | ||
? PossibleType | ||
: unwrapType$1< | ||
Type['fields'][Node['name']['value']]['type'], | ||
Node['selectionSet'], | ||
Introspection, | ||
Fragments, | ||
getTypeDirective<Node> | ||
>; | ||
} | ||
: { | ||
[Prop in getFieldAlias<Node>]: Node['name']['value'] extends '__typename' | ||
? PossibleType | ||
: unwrapType$1< | ||
Type['fields'][Node['name']['value']]['type'], | ||
Node['selectionSet'], | ||
Introspection, | ||
Fragments, | ||
getTypeDirective<Node> | ||
>; | ||
} | ||
: {}) & | ||
_getPossibleTypeSelectionRec<Rest, PossibleType, Type, Introspection, Fragments> | ||
: {}; | ||
? isOptional<Node> extends true | ||
? { | ||
[Prop in getFieldAlias<Node>]?: Node['name']['value'] extends '__typename' | ||
? PossibleType | ||
: unwrapType$1< | ||
Type['fields'][Node['name']['value']]['type'], | ||
Node['selectionSet'], | ||
Introspection, | ||
Fragments, | ||
getTypeDirective<Node> | ||
>; | ||
} | ||
: { | ||
[Prop in getFieldAlias<Node>]: Node['name']['value'] extends '__typename' | ||
? PossibleType | ||
: unwrapType$1< | ||
Type['fields'][Node['name']['value']]['type'], | ||
Node['selectionSet'], | ||
Introspection, | ||
Fragments, | ||
getTypeDirective<Node> | ||
>; | ||
} | ||
: {}) & | ||
SelectionAcc | ||
> | ||
: SelectionAcc; | ||
type getOperationSelectionType< | ||
@@ -1279,19 +1287,24 @@ Definition, | ||
Introspection extends IntrospectionLikeType, | ||
InputObject = {}, | ||
> = InputFields extends [infer InputField, ...infer Rest] | ||
? (InputField extends { | ||
name: any; | ||
type: any; | ||
} | ||
? InputField['type'] extends { | ||
kind: 'NON_NULL'; | ||
} | ||
? { | ||
[Name in InputField['name']]: unwrapType<InputField['type'], Introspection>; | ||
? getInputObjectTypeRec< | ||
Rest, | ||
Introspection, | ||
(InputField extends { | ||
name: any; | ||
type: any; | ||
} | ||
? InputField['type'] extends { | ||
kind: 'NON_NULL'; | ||
} | ||
: { | ||
[Name in InputField['name']]?: unwrapType<InputField['type'], Introspection>; | ||
} | ||
: {}) & | ||
getInputObjectTypeRec<Rest, Introspection> | ||
: {}; | ||
? { | ||
[Name in InputField['name']]: unwrapType<InputField['type'], Introspection>; | ||
} | ||
: { | ||
[Name in InputField['name']]?: unwrapType<InputField['type'], Introspection>; | ||
} | ||
: {}) & | ||
InputObject | ||
> | ||
: InputObject; | ||
type getScalarType< | ||
@@ -1356,32 +1369,37 @@ TypeName, | ||
: null | _unwrapTypeRefRec<Type, Introspection>; | ||
type getVariablesRec<Variables, Introspection extends IntrospectionLikeType> = Variables extends [ | ||
infer Variable, | ||
...infer Rest, | ||
] | ||
? (Variable extends { | ||
kind: Kind.VARIABLE_DEFINITION; | ||
variable: any; | ||
type: any; | ||
} | ||
? Variable extends { | ||
defaultValue: undefined; | ||
type: { | ||
kind: Kind.NON_NULL_TYPE; | ||
}; | ||
} | ||
? { | ||
[Name in Variable['variable']['name']['value']]: unwrapTypeRef< | ||
Variable['type'], | ||
Introspection | ||
>; | ||
type _getVariablesRec< | ||
Variables, | ||
Introspection extends IntrospectionLikeType, | ||
VariablesObject = {}, | ||
> = Variables extends [infer Variable, ...infer Rest] | ||
? _getVariablesRec< | ||
Rest, | ||
Introspection, | ||
(Variable extends { | ||
kind: Kind.VARIABLE_DEFINITION; | ||
variable: any; | ||
type: any; | ||
} | ||
? Variable extends { | ||
defaultValue: undefined; | ||
type: { | ||
kind: Kind.NON_NULL_TYPE; | ||
}; | ||
} | ||
: { | ||
[Name in Variable['variable']['name']['value']]?: unwrapTypeRef< | ||
Variable['type'], | ||
Introspection | ||
>; | ||
} | ||
: {}) & | ||
getVariablesRec<Rest, Introspection> | ||
: {}; | ||
? { | ||
[Name in Variable['variable']['name']['value']]: unwrapTypeRef< | ||
Variable['type'], | ||
Introspection | ||
>; | ||
} | ||
: { | ||
[Name in Variable['variable']['name']['value']]?: unwrapTypeRef< | ||
Variable['type'], | ||
Introspection | ||
>; | ||
} | ||
: {}) & | ||
VariablesObject | ||
> | ||
: VariablesObject; | ||
type getVariablesType< | ||
@@ -1394,3 +1412,3 @@ Document extends DocumentNodeLike, | ||
} | ||
? obj<getVariablesRec<Document['definitions'][0]['variableDefinitions'], Introspection>> | ||
? obj<_getVariablesRec<Document['definitions'][0]['variableDefinitions'], Introspection>> | ||
: {}; | ||
@@ -1397,0 +1415,0 @@ |
{ | ||
"name": "gql.tada", | ||
"description": "The spec-compliant & magical GraphQL query language engine in the TypeScript type system", | ||
"version": "1.2.0", | ||
"version": "1.2.1-canary-cdd6370518407296c4307597b1f0df703a5091fd", | ||
"author": "0no.co <hi@0no.co>", | ||
@@ -6,0 +6,0 @@ "source": "./src/index.ts", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
103620
1939
2