Search code examples
graphql-java

How to set @Pattern directive for graphql enums?


How to set @Pattern directive for graphql enums.

I didn't know how to apply constraints on ENUM


Solution

  • Define the directive and mention on ENUM, ENUM_VALUE

    directive @constraints{

    pattern String

    }on ENUM | ENUM_VALUE