Skip to content

Conversation

@turboezh
Copy link
Contributor

In case of collection-argument with nullable items.

Passing null items in collection-argument causes NPE in org.springframework.graphql.data.GraphQlArgumentBinder#createCollection: Cannot invoke "Object.getClass()" because "rawValue" is null.

Test case:
Schema:

type Query { theData(idList: [ID]!): [String]! }

Query:

{ theData(idList: ["123", null, "234"]) }
In case of collection-argument with nullable items.
@pivotal-cla
Copy link

@turboezh Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@turboezh Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 11, 2022
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 8, 2022
@rstoyanchev rstoyanchev added this to the 1.0.2 milestone Sep 8, 2022
@rstoyanchev rstoyanchev changed the title Fix NPE in argument binder Fix NPE when GraphQL argument is a list with a null element Sep 8, 2022
@turboezh
Copy link
Contributor Author

turboezh commented Sep 8, 2022

Hi, @rstoyanchev. This request was made based on the main branch and I guess this is not a right way. I've made a new one (#486) based on 1.0.x.

@turboezh turboezh closed this Sep 8, 2022
@rstoyanchev
Copy link
Contributor

Thanks. Keep in mind that we do rebase the PR onto 1.0.x or on top of the latest in main, depending on the target milestones, so typically no need to be concerned with this.

@rstoyanchev rstoyanchev removed this from the 1.0.2 milestone Sep 9, 2022
@rstoyanchev rstoyanchev added the status: superseded Issue is superseded by another label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: superseded Issue is superseded by another type: enhancement A general enhancement

4 participants