UNPKG

graphql-gene

Version:

Generates automatically an executable schema out of your ORM models

17 lines (16 loc) 713 B
type Entries<T> = { [K in keyof T]-?: Exclude<T[K], null | undefined> extends never ? never : [K, T[K]]; }[keyof T][]; type Nullable<T> = T | null | undefined; export declare function getEntries<T extends object>(obj: T): Entries<T>; export declare function getOperatorMap<T>(type: T): { eq: (value: Nullable<T>, input: T) => boolean; ne: (value: Nullable<T>, input: T) => boolean; in: (value: Nullable<T>, input: T[]) => boolean; notIn: (value: Nullable<T>, input: T[]) => boolean; null: (value: Nullable<T>, input: boolean) => boolean; } & { like?: (value: Nullable<string>, input: string) => boolean; notLike?: (value: Nullable<string>, input: string) => boolean; }; export {};