Skip to content

Commit ebd8abd

Browse files
nikordarisleebyron
authored andcommitted
Update GraphQLUnionType types (graphql#211)
GraphQLUnionType documentation was missing a Thunk definition for 'types'.
1 parent a3c5b8e commit ebd8abd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

site/graphql-js/APIReference-TypeSystem.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,12 @@ class GraphQLUnionType {
370370

371371
type GraphQLUnionTypeConfig = {
372372
name: string,
373-
types: Array<GraphQLObjectType>,
373+
types: GraphQLObjectsThunk | Array<GraphQLObjectType>,
374374
resolveType?: (value: any, info?: GraphQLResolveInfo) => ?GraphQLObjectType;
375375
description?: ?string;
376376
};
377+
378+
type GraphQLObjectsThunk = () => Array<GraphQLObjectType>;
377379
```
378380
379381
When a field can return one of a heterogeneous set of types, a Union type

0 commit comments

Comments
 (0)