Skip to content

Conversation

@felipe-gdr
Copy link
Member

@felipe-gdr felipe-gdr commented Oct 20, 2023

Non-null inputs are not going through @oneOf validation.

For example, the query bellow will not blow up, even though both fields under the oneOf type are being passed.

  # schema
  type Query {
    search(by: SearchInput!): String
  }
  input SearchInput @oneOf {
    name: String
    id: ID
  }

  # query
  query myQuery {
    search(by: {name: "Figaro", id: "1001"})
  }

@felipe-gdr felipe-gdr marked this pull request as draft October 20, 2023 05:20
@dondonz
Copy link
Member

dondonz commented Oct 20, 2023

Nice! Thanks

@dondonz dondonz added this to the 21.3 milestone Oct 22, 2023
@felipe-gdr felipe-gdr marked this pull request as ready for review October 22, 2023 23:09
@dondonz dondonz added this pull request to the merge queue Oct 22, 2023
Merged via the queue into graphql-java:master with commit ea4414f Oct 22, 2023
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.

3 participants