You are here

public function ValidatorTest::testGetMissingResolversCatchesMissingFieldsOnTypes in GraphQL 8.4

@covers ::getMissingResolvers

File

tests/src/Kernel/ValidatorTest.php, line 19

Class

ValidatorTest
Tests that the GraphQL validator behaves correctly.

Namespace

Drupal\Tests\graphql\Kernel

Code

public function testGetMissingResolversCatchesMissingFieldsOnTypes() : void {
  $schema = <<<GQL
      type Query {
        me: String
      }
GQL;
  $this
    ->setUpSchema($schema);
  $validator = new Validator($this->schemaPluginManager);
  $missing_resolvers = $validator
    ->getMissingResolvers($this->server);
  self::assertEquals([
    'Query' => [
      'me',
    ],
  ], $missing_resolvers);
}