import gql from 'graphql-tag' ; import * as Urql from 'urql' ; export type Maybe < T > = T | null ; export type Exact < T extends { [ key ] : unknown ; } > = { [ K in keyof T ] : T [ K ] ; } ; export type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > > ; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID : string ; String : string ; Boolean : boolean ; Int : number ; Float : number ; } ; export type User = { __typename ? : 'User' ; id : Scalars [ 'String' ] ; name : Scalars [ 'String' ] ; } ; export type Query = { __typename ? : 'Query' ; allUsers ? : Maybe < Array < Maybe < User > > > ; user ? : Maybe < User > ; users : Array < User > ; } ; export type QueryUserArgs = { where : UserWhereUniqueInput ; } ; export type QueryUsersArgs = { first ? : Maybe < Scalars [ 'Int' ] > ; last ? : Maybe < Scalars [ 'Int' ] > ; before ? : Maybe < UserWhereUniqueInput > ; after ? : Maybe < UserWhereUniqueInput > ; } ; export type Mutation = { __typename ? : 'Mutation' ; bigRedButton ? : Maybe < Scalars [ 'String' ] > ; createOneUser : User ; deleteOneUser ? : Maybe < User > ; deleteManyUser : BatchPayload ; updateOneUser ? : Maybe < User > ; updateManyUser : BatchPayload ; } ; export type MutationCreateOneUserArgs = { data : UserCreateInput ; } ; export type MutationDeleteOneUserArgs = { where : UserWhereUniqueInput ; } ; export type MutationDeleteManyUserArgs = { where ? : Maybe < UserWhereInput > ; } ; export type MutationUpdateOneUserArgs = { data : UserUpdateInput ; where : UserWhereUniqueInput ; } ; export type MutationUpdateManyUserArgs = { data : UserUpdateManyMutationInput ; where ? : Maybe < UserWhereInput > ; } ; export type UserWhereUniqueInput = { id ? : Maybe < Scalars [ 'String' ] > ; } ; export type UserCreateInput = { id ? : Maybe < Scalars [ 'String' ] > ; name : Scalars [ 'String' ] ; } ; export type BatchPayload = { __typename ? : 'BatchPayload' ; count : Scalars [ 'Int' ] ; } ; export type UserWhereInput = { AND ? : Maybe < Array < UserWhereInput > > ; OR ? : Maybe < Array < UserWhereInput > > ; NOT ? : Maybe < Array < UserWhereInput > > ; id ? : Maybe < StringFilter > ; name ? : Maybe < StringFilter > ; } ; export type UserUpdateInput = { id ? : Maybe < StringFieldUpdateOperationsInput > ; name ? : Maybe < StringFieldUpdateOperationsInput > ; } ; export type UserUpdateManyMutationInput = { id ? : Maybe < StringFieldUpdateOperationsInput > ; name ? : Maybe < StringFieldUpdateOperationsInput > ; } ; export type StringFilter = { equals ? : Maybe < Scalars [ 'String' ] > ; in ? : Maybe < Array < Scalars [ 'String' ] > > ; notIn ? : Maybe < Array < Scalars [ 'String' ] > > ; lt ? : Maybe < Scalars [ 'String' ] > ; lte ? : Maybe < Scalars [ 'String' ] > ; gt ? : Maybe < Scalars [ 'String' ] > ; gte ? : Maybe < Scalars [ 'String' ] > ; contains ? : Maybe < Scalars [ 'String' ] > ; startsWith ? : Maybe < Scalars [ 'String' ] > ; endsWith ? : Maybe < Scalars [ 'String' ] > ; mode ? : Maybe < QueryMode > ; not ? : Maybe < NestedStringFilter > ; } ; export type StringFieldUpdateOperationsInput = { set ? : Maybe < Scalars [ 'String' ] > ; } ; export enum QueryMode { Default = 'default' , Insensitive = 'insensitive' } export type NestedStringFilter = { equals ? : Maybe < Scalars [ 'String' ] > ; in ? : Maybe < Array < Scalars [ 'String' ] > > ; notIn ? : Maybe < Array < Scalars [ 'String' ] > > ; lt ? : Maybe < Scalars [ 'String' ] > ; lte ? : Maybe < Scalars [ 'String' ] > ; gt ? : Maybe < Scalars [ 'String' ] > ; gte ? : Maybe < Scalars [ 'String' ] > ; contains ? : Maybe < Scalars [ 'String' ] > ; startsWith ? : Maybe < Scalars [ 'String' ] > ; endsWith ? : Maybe < Scalars [ 'String' ] > ; not ? : Maybe < NestedStringFilter > ; } ; export type AllUsersQueryVariables = Exact < { [ key ] : never ; } > ; export type AllUsersQuery = ( { __typename ? : 'Query' ; } & { allUsers ? : Maybe < Array < Maybe < ( { __typename ? : 'User' ; } & Pick < User , 'id' | 'name' > ) > > > ; } ) ; export const AllUsersDocument = gql `
    query AllUsers {
  allUsers {
    id
    name
  }
}
    ` ; export function useAllUsersQuery ( options = { } ) { return Urql . useQuery < AllUsersQuery > ( { query : AllUsersDocument , ... options } ) ; } ;