Skip to content

Commit

Permalink
fix merge input and interface for property name
Browse files Browse the repository at this point in the history
- input, type
  • Loading branch information
mununki committed Oct 9, 2023
1 parent ca8db2c commit c9d68bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (s *Schema) Parse(p *Parser) {
fd.Filename = p.lex.filename
fd.Line = p.lex.line
fd.Column = p.lex.col
name, comments := p.lex.consumeIdent()
name, comments := p.lex.consumeIdent(tokInput, tokType)
fd.Name = name.String()
fd.Descriptions = comments

Expand Down Expand Up @@ -291,7 +291,7 @@ func (s *Schema) Parse(p *Parser) {
fd.Filename = p.lex.filename
fd.Line = p.lex.line
fd.Column = p.lex.col
name, comments := p.lex.consumeIdent()
name, comments := p.lex.consumeIdent(tokInput, tokType)
fd.Name = name.String()
fd.Descriptions = comments
p.lex.consumeToken(tokColon)
Expand Down
8 changes: 8 additions & 0 deletions test/property_type/generated.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ type SomePayload {



interface I {
type: String!
input: String!
}

input I {
type: String!
input: String!
}
4 changes: 4 additions & 0 deletions test/property_type/schema/Input.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
input I {
type: String!
input: String!
}
4 changes: 4 additions & 0 deletions test/property_type/schema/Interface.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface I {
type: String!
input: String!
}

0 comments on commit c9d68bf

Please sign in to comment.