GraphQL\Tests\Executor\ExecutorTest::testDoesNotIncludeIllegalFieldsInOutput PHP Method

testDoesNotIncludeIllegalFieldsInOutput() public method

    public function testDoesNotIncludeIllegalFieldsInOutput()
    {
        $doc = 'mutation M {
      thisIsIllegalDontIncludeMe
    }';
        $ast = Parser::parse($doc);
        $schema = new Schema(['query' => new ObjectType(['name' => 'Q', 'fields' => ['a' => ['type' => Type::string()]]]), 'mutation' => new ObjectType(['name' => 'M', 'fields' => ['c' => ['type' => Type::string()]]])]);
        $mutationResult = Executor::execute($schema, $ast);
        $this->assertEquals(['data' => []], $mutationResult->toArray());
    }