diff --git a/types/graphql-query-complexity/dist/QueryComplexity.d.ts b/types/graphql-query-complexity/dist/QueryComplexity.d.ts index d092151f91..898e2023bb 100644 --- a/types/graphql-query-complexity/dist/QueryComplexity.d.ts +++ b/types/graphql-query-complexity/dist/QueryComplexity.d.ts @@ -20,7 +20,7 @@ export default class QueryComplexity { onOperationDefinitionEnter(operation: OperationDefinitionNode): void; onOperationDefinitionLeave(): GraphQLError | undefined; nodeComplexity(node: FieldNode | FragmentDefinitionNode | InlineFragmentNode | - OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; + OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number; createError(): GraphQLError; getDefaultComplexity(args: object, childScore: number): number; } diff --git a/types/graphql-relay/graphql-relay-tests.ts b/types/graphql-relay/graphql-relay-tests.ts index 860fe1075f..e490329b65 100644 --- a/types/graphql-relay/graphql-relay-tests.ts +++ b/types/graphql-relay/graphql-relay-tests.ts @@ -49,8 +49,8 @@ const resolve: GraphQLFieldResolver = (source, args, context, info) => context.flag = "f"; }; const fields: GraphQLFieldConfigMap = {}; -let t: GraphQLObjectType; -let e: GraphQLObjectType; +let t: GraphQLObjectType; +let e: GraphQLObjectType; const def = connectionDefinitions({ connectionFields: fields, edgeFields: fields, diff --git a/types/graphql-relay/index.d.ts b/types/graphql-relay/index.d.ts index a484429ed7..67edfa3df0 100644 --- a/types/graphql-relay/index.d.ts +++ b/types/graphql-relay/index.d.ts @@ -56,7 +56,7 @@ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionAr export type ConnectionConfigNodeTypeNullable = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType; @@ -75,8 +75,8 @@ export interface ConnectionConfig { } export interface GraphQLConnectionDefinitions { - edgeType: GraphQLObjectType; - connectionType: GraphQLObjectType; + edgeType: GraphQLObjectType; + connectionType: GraphQLObjectType; } /** @@ -256,8 +256,8 @@ export interface GraphQLNodeDefinitions { nodesField: GraphQLFieldConfig; } -export type typeResolverFn = ((any: any) => GraphQLObjectType) | - ((any: any) => Promise>); +export type typeResolverFn = ((any: any) => GraphQLObjectType) | + ((any: any) => Promise); /** * Given a function to map from an ID to an underlying object, and a function diff --git a/types/graphql/execution/execute.d.ts b/types/graphql/execution/execute.d.ts index aff0cc0dd3..fc6ad898d1 100644 --- a/types/graphql/execution/execute.d.ts +++ b/types/graphql/execution/execute.d.ts @@ -136,7 +136,7 @@ export function buildExecutionContext( */ export function collectFields( exeContext: ExecutionContext, - runtimeType: GraphQLObjectType, + runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: { [key: string]: Array }, visitedFragmentNames: { [key: string]: boolean } @@ -146,7 +146,7 @@ export function buildResolveInfo( exeContext: ExecutionContext, fieldDef: GraphQLField, fieldNodes: ReadonlyArray, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, path: ResponsePath ): GraphQLResolveInfo; @@ -180,6 +180,6 @@ export const defaultFieldResolver: GraphQLFieldResolver; */ export function getFieldDef( schema: GraphQLSchema, - parentType: GraphQLObjectType, + parentType: GraphQLObjectType, fieldName: string ): Maybe>; diff --git a/types/graphql/type/definition.d.ts b/types/graphql/type/definition.d.ts index 42851d2f56..97c16f305c 100644 --- a/types/graphql/type/definition.d.ts +++ b/types/graphql/type/definition.d.ts @@ -28,7 +28,7 @@ import { GraphQLSchema } from "./schema"; */ export type GraphQLType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -44,9 +44,9 @@ export function isScalarType(type: any): type is GraphQLScalarType; export function assertScalarType(type: any): GraphQLScalarType; -export function isObjectType(type: any): type is GraphQLObjectType; +export function isObjectType(type: any): type is GraphQLObjectType; -export function assertObjectType(type: any): GraphQLObjectType; +export function assertObjectType(type: any): GraphQLObjectType; export function isInterfaceType(type: any): type is GraphQLInterfaceType; @@ -91,14 +91,14 @@ export function assertInputType(type: any): GraphQLInputType; */ export type GraphQLOutputType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType | GraphQLList | GraphQLNonNull< | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -121,7 +121,7 @@ export function assertLeafType(type: any): GraphQLLeafType; /** * These types may describe the parent context of a selection set. */ -export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; +export type GraphQLCompositeType = GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType; export function isCompositeType(type: any): type is GraphQLCompositeType; @@ -214,7 +214,7 @@ export function assertWrappingType(type: any): GraphQLWrappingType; */ export type GraphQLNullableType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -234,7 +234,7 @@ export function getNullableType(type: GraphQLNonN */ export type GraphQLNamedType = | GraphQLScalarType - | GraphQLObjectType + | GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | GraphQLEnumType @@ -390,7 +390,7 @@ export interface GraphQLResolveInfo { readonly fieldName: string; readonly fieldNodes: ReadonlyArray; readonly returnType: GraphQLOutputType; - readonly parentType: GraphQLObjectType; + readonly parentType: GraphQLObjectType; readonly path: ResponsePath; readonly schema: GraphQLSchema; readonly fragments: { [key: string]: FragmentDefinitionNode }; @@ -533,7 +533,7 @@ export class GraphQLUnionType { constructor(config: GraphQLUnionTypeConfig); - getTypes(): GraphQLObjectType[]; + getTypes(): GraphQLObjectType[]; toString(): string; toJSON(): string; @@ -542,7 +542,7 @@ export class GraphQLUnionType { export interface GraphQLUnionTypeConfig { name: string; - types: Thunk[]>; + types: Thunk; /** * Optionally provide a custom type resolver function. If one is not provided, * the default implementation will call `isTypeOf` on each implementing diff --git a/types/graphql/type/introspection.d.ts b/types/graphql/type/introspection.d.ts index 6047f7a3bd..beed0ebeb2 100644 --- a/types/graphql/type/introspection.d.ts +++ b/types/graphql/type/introspection.d.ts @@ -10,13 +10,13 @@ import { } from "./definition"; import { GraphQLField } from "./definition"; -export const __Schema: GraphQLObjectType; -export const __Directive: GraphQLObjectType; +export const __Schema: GraphQLObjectType; +export const __Directive: GraphQLObjectType; export const __DirectiveLocation: GraphQLEnumType; -export const __Type: GraphQLObjectType; -export const __Field: GraphQLObjectType; -export const __InputValue: GraphQLObjectType; -export const __EnumValue: GraphQLObjectType; +export const __Type: GraphQLObjectType; +export const __Field: GraphQLObjectType; +export const __InputValue: GraphQLObjectType; +export const __EnumValue: GraphQLObjectType; export const TypeKind: { SCALAR: "SCALAR"; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 5d5a409af2..7ccb390dbe 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -41,14 +41,14 @@ export class GraphQLSchema { constructor(config: GraphQLSchemaConfig); - getQueryType(): Maybe>; - getMutationType(): Maybe>; - getSubscriptionType(): Maybe>; + getQueryType(): Maybe; + getMutationType(): Maybe; + getSubscriptionType(): Maybe; getTypeMap(): TypeMap; getType(name: string): Maybe; - getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray>; + getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray; - isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; + isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean; getDirectives(): ReadonlyArray; getDirective(name: string): Maybe; @@ -77,9 +77,9 @@ export interface GraphQLSchemaValidationOptions { } export interface GraphQLSchemaConfig extends GraphQLSchemaValidationOptions { - query: Maybe>; - mutation?: Maybe>; - subscription?: Maybe>; + query: Maybe; + mutation?: Maybe; + subscription?: Maybe; types?: Maybe; directives?: Maybe; astNode?: Maybe; diff --git a/types/graphql/utilities/getOperationRootType.d.ts b/types/graphql/utilities/getOperationRootType.d.ts index b1ec93d02e..e1f88e7e13 100644 --- a/types/graphql/utilities/getOperationRootType.d.ts +++ b/types/graphql/utilities/getOperationRootType.d.ts @@ -8,4 +8,4 @@ import { GraphQLObjectType } from "../type/definition"; export function getOperationRootType( schema: GraphQLSchema, operation: OperationDefinitionNode | OperationTypeDefinitionNode -): GraphQLObjectType; +): GraphQLObjectType;