graphql-gene
Version:
Generates automatically an executable schema out of your ORM models
20 lines (19 loc) • 1.41 kB
TypeScript
import { FieldLines, TypeDefLines } from './types';
export declare const VALID_RETURN_TYPES_FOR_WHERE: readonly ["String", "Int", "Float", "Boolean", "Date", "DateTime"];
export declare function populateArgsDefForDefaultResolver(options: {
fieldLineConfig: FieldLines[string];
graphqlType: string;
fieldKey: string;
isList: boolean;
}): void;
export declare function getWhereOptionsInputName<TType extends string, TField extends string>(typeName: TType, fieldName: TField): `${Capitalize<string>}WhereOptions${Capitalize<string>}`;
export declare function getQueryOrderEnumName<TType extends string, TField extends string>(typeName: TType, fieldName: TField): `${Capitalize<string>}SelectOrder${Capitalize<string>}`;
export declare function generateGraphqlTypeName<TType extends string, TField extends string, TSuffix extends string>(typeName: string, fieldName: string, suffix: TSuffix): `${Capitalize<TType>}${Capitalize<TSuffix>}${Capitalize<TField>}`;
export declare function getOperatorInputName(graphqlType: (typeof VALID_RETURN_TYPES_FOR_WHERE)[number]): `GeneOperator${string}Input`;
export declare function generateOperatorInputLines(graphqlType: (typeof VALID_RETURN_TYPES_FOR_WHERE)[number]): FieldLines;
export declare function generateDefaultQueryFilterTypeDefs(options: {
typeDefLines: TypeDefLines;
graphqlType: string;
fieldKey: string;
fieldType: string;
}): void;