unknownTypeMessage() static public method

static public unknownTypeMessage ( $typeName )
Esempio n. 1
0
 public function __invoke(ValidationContext $context)
 {
     return [Node::NAME => function (Name $node, $key) use($context) {
         if ($key === 'type' || $key === 'typeCondition') {
             $typeName = $node->value;
             $type = $context->getSchema()->getType($typeName);
             if (!$type) {
                 return new Error(Messages::unknownTypeMessage($typeName), [$node]);
             }
         }
     }];
 }
Esempio n. 2
0
 private function unknownType($typeName, $line, $column)
 {
     return new FormattedError(Messages::unknownTypeMessage($typeName), [new SourceLocation($line, $column)]);
 }