/**
 * This file was automatically generated by GraphQL Nexus
 * Do not make changes to this file directly
 */

import { connectionPluginCore, core } from "@nexus/schema";
import { FieldAuthorizeResolver } from "@nexus/schema/dist/plugins/fieldAuthorizePlugin";
import { QueryComplexity } from "@nexus/schema/dist/plugins/queryComplexityPlugin";
import { UnusedInterfaceTypeDef } from "./kitchen-sink-definitions";
declare global {
  interface NexusGenCustomInputMethods<TypeName extends string> {
    date<FieldName extends string>(
      fieldName: FieldName,
      opts?: core.ScalarInputFieldConfig<
        core.GetGen3<"inputTypes", TypeName, FieldName>
      >
    ): void; // "Date";
  }
}
declare global {
  interface NexusGenCustomOutputMethods<TypeName extends string> {
    date<FieldName extends string>(
      fieldName: FieldName,
      ...opts: core.ScalarOutSpread<TypeName, FieldName>
    ): void; // "Date";
    connectionField<FieldName extends string>(
      fieldName: FieldName,
      config: connectionPluginCore.ConnectionFieldConfig<TypeName, FieldName>
    ): void;
  }
}

declare global {
  interface NexusGen extends NexusGenTypes {}
}

export interface NexusGenInputs {
  InputType: {
    // input type
    answer?: number | null; // Int
    key: string; // String!
    nestedInput?: NexusGenInputs["InputType2"] | null; // InputType2
  };
  InputType2: {
    // input type
    answer?: number | null; // Int
    key: string; // String!
    someDate: any; // Date!
  };
  NestedType: {
    // input type
    veryNested?: string | null; // String
  };
  SomeArg: {
    // input type
    arg?: NexusGenInputs["NestedType"] | null; // NestedType
    someField?: string | null; // String
  };
}

export interface NexusGenEnums {}

export interface NexusGenRootTypes {
  BooleanConnection: {
    // root type
    edges?: Array<NexusGenRootTypes["BooleanEdge"] | null> | null; // [BooleanEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  BooleanEdge: {
    // root type
    cursor: string; // String!
    node: boolean; // Boolean!
  };
  ComplexObject: {
    // root type
    id: string; // ID!
  };
  DateConnection: {
    // root type
    edges?: Array<NexusGenRootTypes["DateEdge"] | null> | null; // [DateEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  DateEdge: {
    // root type
    cursor: string; // String!
    node: any; // Date!
  };
  Foo: {
    // root type
    name: string; // String!
    ok: boolean; // Boolean!
  };
  Mutation: {};
  PageInfo: {
    // root type
    endCursor?: string | null; // String
    hasNextPage: boolean; // Boolean!
    hasPreviousPage: boolean; // Boolean!
    startCursor?: string | null; // String
  };
  Query: {};
  SomeItem: {
    // root type
    id: string; // ID!
  };
  TestObj: {
    // root type
    a?: NexusGenRootTypes["Bar"] | null; // Bar
    item: string; // String!
    ok: boolean; // Boolean!
  };
  User: {
    // root type
    id: string; // ID!
    name: string; // String!
  };
  UserConnection: {
    // root type
    edges?: Array<NexusGenRootTypes["UserEdge"] | null> | null; // [UserEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  UserEdge: {
    // root type
    cursor: string; // String!
    node: NexusGenRootTypes["User"]; // User!
  };
  Bar: NexusGenRootTypes["TestObj"] | NexusGenRootTypes["Foo"];
  Baz: NexusGenRootTypes["TestObj"];
  UnusedInterface: UnusedInterfaceTypeDef;
  String: string;
  Int: number;
  Float: number;
  Boolean: boolean;
  ID: string;
  Date: Date;
  TestUnion: NexusGenRootTypes["Foo"];
}

export interface NexusGenAllTypes extends NexusGenRootTypes {
  InputType: NexusGenInputs["InputType"];
  InputType2: NexusGenInputs["InputType2"];
  NestedType: NexusGenInputs["NestedType"];
  SomeArg: NexusGenInputs["SomeArg"];
}

export interface NexusGenFieldTypes {
  BooleanConnection: {
    // field return type
    edges: Array<NexusGenRootTypes["BooleanEdge"] | null> | null; // [BooleanEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  BooleanEdge: {
    // field return type
    cursor: string; // String!
    node: boolean; // Boolean!
  };
  ComplexObject: {
    // field return type
    id: string; // ID!
  };
  DateConnection: {
    // field return type
    edges: Array<NexusGenRootTypes["DateEdge"] | null> | null; // [DateEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  DateEdge: {
    // field return type
    cursor: string; // String!
    node: any; // Date!
  };
  Foo: {
    // field return type
    argsTest: boolean; // Boolean!
    name: string; // String!
    ok: boolean; // Boolean!
  };
  Mutation: {
    // field return type
    ok: boolean; // Boolean!
    someMutationField: NexusGenRootTypes["Foo"]; // Foo!
  };
  PageInfo: {
    // field return type
    endCursor: string | null; // String
    hasNextPage: boolean; // Boolean!
    hasPreviousPage: boolean; // Boolean!
    startCursor: string | null; // String
  };
  Query: {
    // field return type
    asArgExample: string; // String!
    bar: NexusGenRootTypes["TestObj"]; // TestObj!
    booleanConnection: NexusGenRootTypes["BooleanConnection"]; // BooleanConnection!
    complexQuery: NexusGenRootTypes["ComplexObject"][]; // [ComplexObject!]!
    dateAsList: any[]; // [Date!]!
    extended: NexusGenRootTypes["SomeItem"]; // SomeItem!
    getNumberOrNull: number | null; // Int
    guardedConnection: NexusGenRootTypes["DateConnection"]; // DateConnection!
    inlineArgs: string; // String!
    inputAsArgExample: string; // String!
    protectedField: number; // Int!
    userConnectionAdditionalArgs: NexusGenRootTypes["UserConnection"]; // UserConnection!
    userConnectionBackwardOnly: NexusGenRootTypes["UserConnection"]; // UserConnection!
    userConnectionForwardOnly: NexusGenRootTypes["UserConnection"]; // UserConnection!
    usersConnectionNodes: NexusGenRootTypes["UserConnection"]; // UserConnection!
    usersConnectionResolve: NexusGenRootTypes["UserConnection"]; // UserConnection!
  };
  SomeItem: {
    // field return type
    id: string; // ID!
  };
  TestObj: {
    // field return type
    a: NexusGenRootTypes["Bar"] | null; // Bar
    argsTest: boolean; // Boolean!
    item: string; // String!
    ok: boolean; // Boolean!
  };
  User: {
    // field return type
    id: string; // ID!
    name: string; // String!
  };
  UserConnection: {
    // field return type
    edges: Array<NexusGenRootTypes["UserEdge"] | null> | null; // [UserEdge]
    pageInfo: NexusGenRootTypes["PageInfo"]; // PageInfo!
  };
  UserEdge: {
    // field return type
    cursor: string; // String!
    node: NexusGenRootTypes["User"]; // User!
  };
  Bar: {
    // field return type
    argsTest: boolean; // Boolean!
    ok: boolean; // Boolean!
  };
  Baz: {
    // field return type
    a: NexusGenRootTypes["Bar"] | null; // Bar
    ok: boolean; // Boolean!
  };
  UnusedInterface: {
    // field return type
    ok: boolean; // Boolean!
  };
}

export interface NexusGenArgTypes {
  Foo: {
    argsTest: {
      // args
      a?: NexusGenInputs["InputType"] | null; // InputType
    };
  };
  Mutation: {
    someMutationField: {
      // args
      id: string; // ID!
    };
  };
  Query: {
    asArgExample: {
      // args
      testAsArg: NexusGenInputs["InputType"]; // InputType!
    };
    booleanConnection: {
      // args
      after?: string | null; // String
      first: number; // Int!
    };
    complexQuery: {
      // args
      count: number; // Int!
    };
    getNumberOrNull: {
      // args
      a: number; // Int!
    };
    guardedConnection: {
      // args
      after?: string | null; // String
      first: number; // Int!
    };
    inlineArgs: {
      // args
      someArg?: NexusGenInputs["SomeArg"] | null; // SomeArg
    };
    inputAsArgExample: {
      // args
      testInput?: NexusGenInputs["InputType"] | null; // InputType
      testScalar?: string | null; // String
    };
    userConnectionAdditionalArgs: {
      // args
      after?: string | null; // String
      first: number; // Int!
      isEven?: boolean | null; // Boolean
    };
    userConnectionBackwardOnly: {
      // args
      before?: string | null; // String
      last: number; // Int!
    };
    userConnectionForwardOnly: {
      // args
      after?: string | null; // String
      first: number; // Int!
    };
    usersConnectionNodes: {
      // args
      after?: string | null; // String
      before?: string | null; // String
      first?: number | null; // Int
      last?: number | null; // Int
    };
    usersConnectionResolve: {
      // args
      after?: string | null; // String
      before?: string | null; // String
      first?: number | null; // Int
      last?: number | null; // Int
    };
  };
  TestObj: {
    argsTest: {
      // args
      a?: NexusGenInputs["InputType"] | null; // InputType
    };
  };
  Bar: {
    argsTest: {
      // args
      a?: NexusGenInputs["InputType"] | null; // InputType
    };
  };
}

export interface NexusGenAbstractResolveReturnTypes {
  TestUnion: "Foo";
  Bar: "TestObj" | "Foo";
  Baz: "TestObj";
}

export interface NexusGenInheritedFields {}

export type NexusGenObjectNames =
  | "BooleanConnection"
  | "BooleanEdge"
  | "ComplexObject"
  | "DateConnection"
  | "DateEdge"
  | "Foo"
  | "Mutation"
  | "PageInfo"
  | "Query"
  | "SomeItem"
  | "TestObj"
  | "User"
  | "UserConnection"
  | "UserEdge";

export type NexusGenInputNames =
  | "InputType"
  | "InputType2"
  | "NestedType"
  | "SomeArg";

export type NexusGenEnumNames = never;

export type NexusGenInterfaceNames = "Bar" | "Baz" | "UnusedInterface";

export type NexusGenScalarNames =
  | "Boolean"
  | "Date"
  | "Float"
  | "ID"
  | "Int"
  | "String";

export type NexusGenUnionNames = "TestUnion";

export interface NexusGenTypes {
  context: any;
  inputTypes: NexusGenInputs;
  rootTypes: NexusGenRootTypes;
  argTypes: NexusGenArgTypes;
  fieldTypes: NexusGenFieldTypes;
  allTypes: NexusGenAllTypes;
  inheritedFields: NexusGenInheritedFields;
  objectNames: NexusGenObjectNames;
  inputNames: NexusGenInputNames;
  enumNames: NexusGenEnumNames;
  interfaceNames: NexusGenInterfaceNames;
  scalarNames: NexusGenScalarNames;
  unionNames: NexusGenUnionNames;
  allInputTypes:
    | NexusGenTypes["inputNames"]
    | NexusGenTypes["enumNames"]
    | NexusGenTypes["scalarNames"];
  allOutputTypes:
    | NexusGenTypes["objectNames"]
    | NexusGenTypes["enumNames"]
    | NexusGenTypes["unionNames"]
    | NexusGenTypes["interfaceNames"]
    | NexusGenTypes["scalarNames"];
  allNamedTypes:
    | NexusGenTypes["allInputTypes"]
    | NexusGenTypes["allOutputTypes"];
  abstractTypes: NexusGenTypes["interfaceNames"] | NexusGenTypes["unionNames"];
  abstractResolveReturn: NexusGenAbstractResolveReturnTypes;
}

declare global {
  interface NexusGenPluginTypeConfig<TypeName extends string> {}
  interface NexusGenPluginFieldConfig<
    TypeName extends string,
    FieldName extends string
  > {
    /**
     * The complexity for an individual field. Return a number
     * or a function that returns a number to specify the
     * complexity for this field.
     */
    complexity?: QueryComplexity<TypeName, FieldName>;
    /**
     * Authorization for an individual field. Returning "true"
     * or "Promise<true>" means the field can be accessed.
     * Returning "false" or "Promise<false>" will respond
     * with a "Not Authorized" error for the field.
     * Returning or throwing an error will also prevent the
     * resolver from executing.
     */
    authorize?: FieldAuthorizeResolver<TypeName, FieldName>;
    /**
     * The nullability guard can be helpful, but is also a pottentially expensive operation for lists.
     * We need to iterate the entire list to check for null items to guard against. Set this to true
     * to skip the null guard on a specific field if you know there's no potential for unsafe types.
     */
    skipNullGuard?: boolean;
  }
  interface NexusGenPluginSchemaConfig {}
}
