Skip to content

@notblank validation on input type is not working. Getting below error. #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brendamckenne opened this issue Apr 4, 2020 · 1 comment

Comments

@brendamckenne
Copy link

brendamckenne commented Apr 4, 2020

@notblank validation on input type is not working. Getting below error.

Schema is like this:

directive @NotBlank(message : String = "graphql.validation.NotBlank.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION

type Query {
  group(id: GroupIDInput) : Group
}

input GroupIDInput {
    name: String @NotBlank
}

Getting below error:

{"errorType":"java.lang.NoSuchMethodError","errorMessage":"graphql.schema.GraphQLInputType.getName()Ljava/lang/String;","stackTrace":["graphql.validation.constraints.AbstractDirectiveConstraint.isOneOfTheseTypes(AbstractDirectiveConstraint.java:167)","graphql.validation.constraints.standard.NotBlankRule.appliesToType(NotBlankRule.java:39)","graphql.validation.constraints.AbstractDirective

@brendamckenne brendamckenne changed the title Validations work but then resolvers don't work @notblank validation on input type is not working. Getting below error. Apr 6, 2020
@setchy
Copy link
Collaborator

setchy commented Sep 20, 2020

Closing this as duplicate of #13

@setchy setchy closed this as completed Sep 20, 2020
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

No branches or pull requests

2 participants