validateElement method

  1. @override
void validateElement(
  1. SchemaValidationContext context,
  2. GraphQLElement element
)
override

Validates the provided element following the configuration of this attachment

Implementation

@override
void validateElement(
  SchemaValidationContext context,
  GraphQLElement element,
) {
  try {
    // TODO: 2A more validations and make it a package or experimental
    _jsonSpec();
  } catch (_) {
    context.reportError(
      'ValidaAttachment.annotation ($annotation)'
      ' should be json serializable',
      [],
    );
  }
}