Are there any directives, that would restrict client from sending bad data to auto generated GraphQL Endpoint?
For example: Restricting client from setting a bad email, phone number, postal code, “Username should be minimum of 3 characters long”, or “Message should be 30 characters at least”
@regex directive on a mutation perhaps?
As it can be useful in cases where:
- Either I mess up and don’t have client side validation or
- If front end is compromised and people spam bad data into back-end or
- Someone uses postman kind of tool which doesn’t have client side validation.