1 | import { SelectionSet } from "apollo-codegen-core/lib/compiler";
|
2 | import { Set } from "immutable";
|
3 | import { GraphQLInputType } from "graphql";
|
4 | export declare type List<T> = {
|
5 | kind: "List";
|
6 | ofType: T;
|
7 | };
|
8 | export declare type Maybe<T> = {
|
9 | kind: "Maybe";
|
10 | ofType: T;
|
11 | };
|
12 | export declare type Typename = {
|
13 | kind: "Typename";
|
14 | possibleTypes: Set<string>;
|
15 | };
|
16 | export declare const Typename: (possibleTypes: Set<string>) => Typename;
|
17 | export declare type Field = {
|
18 | name: string;
|
19 | type: OutputType | Typename;
|
20 | };
|
21 | export declare type FragmentReference = {
|
22 | kind: "FragmentReference";
|
23 | name: string;
|
24 | possibleTypes: Set<string>;
|
25 | };
|
26 | export declare type InlineSelection = {
|
27 | kind: "InlineSelection";
|
28 | possibleTypes: Set<string>;
|
29 | intersections: FragmentReference[];
|
30 | fields: Field[];
|
31 | booleanConditions: FragmentOrSelection[];
|
32 | typeConditions: FragmentOrSelection[];
|
33 | };
|
34 | export declare type FragmentOrSelection = FragmentReference | InlineSelection;
|
35 | export declare type InputObject = {
|
36 | kind: "InputObject";
|
37 | name: string;
|
38 | };
|
39 | export declare type Enum = {
|
40 | kind: "Enum";
|
41 | name: string;
|
42 | values: string[];
|
43 | };
|
44 | export declare type Scalar = {
|
45 | kind: "Scalar";
|
46 | name: string;
|
47 | isTypename: boolean;
|
48 | };
|
49 | export declare type Leaf = Enum | Scalar;
|
50 | export interface MaybeType<T> extends Maybe<Type<T>> {
|
51 | }
|
52 | export interface ListType<T> extends List<Type<T>> {
|
53 | }
|
54 | export declare type Type<T> = T | MaybeType<T> | ListType<T>;
|
55 | export declare type OutputType = Type<FragmentOrSelection | Leaf>;
|
56 | export declare type InputType = Type<InputObject | Leaf>;
|
57 | export declare const List: <T>(ofType: T) => List<T>;
|
58 | export declare const Maybe: <T>(ofType: T) => Maybe<T>;
|
59 | export declare const InputType: (type: GraphQLInputType) => Type<Enum | Scalar | InputObject>;
|
60 | export declare const FragmentReference: (name: string, possibleTypes: Set<string>) => FragmentReference;
|
61 | export declare const InlineSelection: (selectionSet: SelectionSet) => InlineSelection;
|
62 | export declare const AnyObject: (selectionSet: SelectionSet) => FragmentOrSelection;
|