Skip to content

Commit

Permalink
Merge extendType functionality changes from #1322 (#1373)
Browse files Browse the repository at this point in the history
* Extend the extend functionality

* Fix flowtype

* Extract logic from _makeInputValues to its own function

* Fix lint and minor refactors

* Fix type error due to copy & paste

* Fix array syntax

* Fix test more verbose

* Removed unnecessary check

* Extend directive

* Moved new tests into existing tests

* Fix lint errors

* Added missing description

* fix enum value error test
  • Loading branch information
mjmahone authored Jun 7, 2018
1 parent 43c0d46 commit 45ecb53
Show file tree
Hide file tree
Showing 4 changed files with 558 additions and 38 deletions.
3 changes: 3 additions & 0 deletions src/type/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ export class GraphQLUnionType {
name: string;
description: ?string;
astNode: ?UnionTypeDefinitionNode;
extensionASTNodes: ?$ReadOnlyArray<ObjectTypeExtensionNode>;
resolveType: ?GraphQLTypeResolver<*, *>;

_typeConfig: GraphQLUnionTypeConfig<*, *>;
Expand Down Expand Up @@ -1081,6 +1082,7 @@ export class GraphQLEnumType /* <T> */ {
name: string;
description: ?string;
astNode: ?EnumTypeDefinitionNode;
extensionASTNodes: ?$ReadOnlyArray<ObjectTypeExtensionNode>;

_values: Array<GraphQLEnumValue /* <T> */>;
_valueLookup: Map<any /* T */, GraphQLEnumValue>;
Expand Down Expand Up @@ -1230,6 +1232,7 @@ export class GraphQLInputObjectType {
name: string;
description: ?string;
astNode: ?InputObjectTypeDefinitionNode;
extensionASTNodes: ?$ReadOnlyArray<ObjectTypeExtensionNode>;

_typeConfig: GraphQLInputObjectTypeConfig;
_fields: GraphQLInputFieldMap;
Expand Down
Loading

0 comments on commit 45ecb53

Please sign in to comment.