UNPKG

1.1 kBTypeScriptView Raw
1/// <reference types="@types/graphql" />
2import { GraphQLObjectType } from 'graphql/type/definition';
3import { GraphQLField } from 'graphql/type/definition';
4import { GraphQLType } from 'graphql/type/definition';
5import { Model } from './interfaces';
6import { GraphQLSchema } from 'graphql/type/schema';
7import { OperationDefinitionNode } from 'graphql/language/ast';
8export declare const isPrimitive: (primitivesMap: any, type: string) => any;
9export declare const shouldSkip: (typeName: string) => boolean;
10export declare const isRequired: (type: GraphQLType) => boolean;
11export declare const isArray: (type: GraphQLType) => boolean;
12export declare const getTypeName: (primitivesMap: any, type: GraphQLType) => any;
13export declare function getFieldDef(parentType: any, fieldAST: any): GraphQLField<any, any>;
14export declare const handleNameDuplications: (name: string, existing: Model[]) => string;
15export declare const getRoot: (schema: GraphQLSchema, operation: OperationDefinitionNode) => GraphQLObjectType;
16export declare const buildName: (typesMap: any, name: string, type: string) => string;