filipstefansson / nexus-validate

🔑 Add argument validation to your GraphQL Nexus API.
35 stars 8 forks source link

feat: allow validation of subfields #8

Closed filipstefansson closed 3 years ago

filipstefansson commented 3 years ago

What this PR is about:

There's currently a constraint that the validate method can only be added to a field with Query or Mutation as parent. This is bad, because a query can look like this:

{
  users(email: "test@test.com") {
    id
    friends(filter: { email: "friend@email.com" }) {
      id
    }
  }
}

This PR removes the constraint and adds a new one: you can now only pass the validate method to a field that has args.

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.0.0-alpha.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: