Youshido\Tests\DataProvider\TestObjectType::build PHP Method

build() public method

public build ( $config )
    public function build($config)
    {
        $config->addField('id', new IntType())->addField('name', new StringType())->addField('region', new ObjectType(['name' => 'Region', 'fields' => ['country' => new StringType(), 'city' => new StringType()]]))->addField('location', ['type' => new ObjectType(['name' => 'Location', 'fields' => ['address' => new StringType()]]), 'args' => ['noop' => new IntType()], 'resolve' => function ($value, $args, $info) {
            return ['address' => '1234 Street'];
        }])->addField('echo', ['type' => new StringType(), 'args' => ['value' => new NonNullType(new StringType())], 'resolve' => function ($value, $args, $info) {
            return $args['value'];
        }]);
    }