The variables the caller passed to the operation.
The requirement description for the operation.
The error message describing what the operation needs.
Nothing when the requirement is satisfied.
An AniLinkValidationError when the requirements are not met.
Enforces the variable requirements of an AniList operation.
AniList rejects several query operations at runtime with messages such as "The Media query requires at least 1 argument." even though the GraphQL schema declares every argument as optional. This helper lets each operation describe its real contract so callers fail fast with a local AniLinkValidationError instead of a remote 400.
A variable satisfies a requirement when it is present with a value other than
undefinedandnull. Requirements are expressed as:"one": at least one variable must be set."all": every listed variable must be set."any": at least one of the listed variables must be set."notOnly": at least one variable must be set, and at least one set variable must not appear innames.