Skip to content

Some directives should apply to the ID type  #21

@paul-pop

Description

@paul-pop

First and foremost, thank you for this library, it's fantastic and I hope it gets the love it deserves 🙂

I am currently seeing an issue when I try to add certain directives to ID fields:

Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'graphQLSchema' threw exception; nested exception is graphql.AssertException: The directive rule '@NotBlank' cannot be placed on elements of type 'ID'"

I think some directives like @NotEmpty, @NotBlank to start off would really help on ID fields. If you want to be extra safe we could even add @Pattern, @Expression, @Size and others later.

If I get the chance I will work on this and raise a PR but currently a bit swamped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions