Skip to content

Commit

Permalink
Merge pull request #167 from nemanja-stanarevic/master
Browse files Browse the repository at this point in the history
Fixed the issue #166 related to parsing of 'extend type' declaration
  • Loading branch information
leebyron committed Sep 9, 2015
2 parents 3bc93a7 + b96a0d4 commit e556526
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/language/__tests__/schema-kitchen-sink.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ input InputType {
key: String!
answer: Int = 42
}

extend type Foo {
seven(argument: [String]): Type
}
4 changes: 4 additions & 0 deletions src/language/__tests__/schema-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ input InputType {
key: String!
answer: Int = 42
}
extend type Foo {
seven(argument: [String]): Type
}
`);

});
Expand Down
4 changes: 2 additions & 2 deletions src/language/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import {
ENUM_VALUE_DEFINITION,
INPUT_OBJECT_TYPE_DEFINITION,

TYPE_EXTENTION_DEFINITION,
TYPE_EXTENSION_DEFINITION,
} from './kinds';


Expand Down Expand Up @@ -893,7 +893,7 @@ function parseTypeExtensionDefinition(parser): TypeExtensionDefinition {
expectKeyword(parser, 'extend');
var definition = parseObjectTypeDefinition(parser);
return {
kind: TYPE_EXTENTION_DEFINITION,
kind: TYPE_EXTENSION_DEFINITION,
definition,
loc: loc(parser, start),
};
Expand Down

0 comments on commit e556526

Please sign in to comment.