Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/type/definition.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export function argsToArgsConfig(
export interface GraphQLObjectTypeConfig<TSource, TContext> {
name: string;
description?: Maybe<string>;
interfaces?: Thunk<Maybe<Array<GraphQLInterfaceType>>>;
interfaces?: Thunk<Array<GraphQLInterfaceType>>;
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
isTypeOf?: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
extensions?: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;
Expand Down Expand Up @@ -635,7 +635,7 @@ export class GraphQLInterfaceType {
export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
name: string;
description?: Maybe<string>;
interfaces?: Thunk<Maybe<Array<GraphQLInterfaceType>>>;
interfaces?: Thunk<Array<GraphQLInterfaceType>>;
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>;
/**
* Optionally provide a custom type resolver function. If one is not provided,
Expand Down
6 changes: 3 additions & 3 deletions src/type/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ function defineInterfaces(
| GraphQLInterfaceTypeConfig<mixed, mixed>,
>,
): Array<GraphQLInterfaceType> {
const interfaces = resolveThunk(config.interfaces) ?? [];
const interfaces = resolveThunk(config.interfaces ?? []);
devAssert(
Array.isArray(interfaces),
`${config.name} interfaces must be an Array or a function which returns an Array.`,
Expand Down Expand Up @@ -875,7 +875,7 @@ export function argsToArgsConfig(
export type GraphQLObjectTypeConfig<TSource, TContext> = {|
name: string,
description?: ?string,
interfaces?: Thunk<?Array<GraphQLInterfaceType>>,
interfaces?: Thunk<Array<GraphQLInterfaceType>>,
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>,
isTypeOf?: ?GraphQLIsTypeOfFn<TSource, TContext>,
extensions?: ?ReadOnlyObjMapLike<mixed>,
Expand Down Expand Up @@ -1086,7 +1086,7 @@ export class GraphQLInterfaceType {
export type GraphQLInterfaceTypeConfig<TSource, TContext> = {|
name: string,
description?: ?string,
interfaces?: Thunk<?Array<GraphQLInterfaceType>>,
interfaces?: Thunk<Array<GraphQLInterfaceType>>,
fields: Thunk<GraphQLFieldConfigMap<TSource, TContext>>,
/**
* Optionally provide a custom type resolver function. If one is not provided,
Expand Down