Skip to content

1897: Fix field argument validation in SchemaValidator - #1920

Merged
andimarek merged 1 commit into
graphql-java:masterfrom
felipe-gdr:1897_fix-field-argument-validation
May 25, 2020
Merged

andimarek merged 1 commit into
graphql-java:masterfrom
felipe-gdr:1897_fix-field-argument-validation

Conversation

@felipe-gdr

@felipe-gdr felipe-gdr commented May 24, 2020 •

Copy link
Copy Markdown
Member

Implementing type can declare more field arguments than in the implemented interface given that the extra arguments are optional (aka not non-null).

fixes: #1897

goodErrorCollector.getErrors().isEmpty()
}

def "type can declare extra optional field arguments"() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add also an SDL based test, because we are currently not always consistent.

@felipe-gdr felipe-gdr May 24, 2020 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are tests that cover that for the SDL already in graphql.schema.idl.SchemaTypeCheckerTest.

"test field arguments on object can contain additional optional arguments"

Currently, the SDL validation doesn't reproduce the error described in the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong assumption on argument count for implementation of interfaces

2 participants