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

testCorrectlyThreadsArguments() public method

    public function testCorrectlyThreadsArguments()
    {
        $doc = '
      query Example {
        b(numArg: 123, stringArg: "foo")
      }
        ';
        $gotHere = false;
        $docAst = Parser::parse($doc);
        $schema = new Schema(['query' => new ObjectType(['name' => 'Type', 'fields' => ['b' => ['args' => ['numArg' => ['type' => Type::int()], 'stringArg' => ['type' => Type::string()]], 'type' => Type::string(), 'resolve' => function ($_, $args) use(&$gotHere) {
            $this->assertEquals(123, $args['numArg']);
            $this->assertEquals('foo', $args['stringArg']);
            $gotHere = true;
        }]]])]);
        Executor::execute($schema, $docAst, null, null, [], 'Example');
        $this->assertSame($gotHere, true);
    }