Validate graphql query/mutation arguments on Elixir

GraphQL types can be leveraged for data validation to a large degree, provided you make use of the tools it provides (i.e. enums). You can get additional validation through custom types like email or url, but you’ll need to write the parsing and dumping yourself, and in a way that emits helpful errors.

There are plenty of places where GraphQL/Absinthe can’t help you though. For example, if you want to enforce a string is a certain size, or that a particular field is filled in but another isn’t, or a provided ID actually exists in the database. You’ll need to fall back to validating with Ecto and your application’s business rules.