Youshido\GraphQL\Relay\Connection\Connection::connectionArgs PHP Метод

connectionArgs() публичный статический Метод

public static connectionArgs ( )
    public static function connectionArgs()
    {
        return array_merge(self::forwardArgs(), self::backwardArgs());
    }

Usage Example

Пример #1
0
 public function build($config)
 {
     $config->addField(new GlobalIdField(self::TYPE_KEY))->addField('factionId', ['type' => new IntType(), 'resolve' => function ($value) {
         return $value['id'];
     }])->addField('name', ['type' => TypeMap::TYPE_STRING, 'description' => 'The name of the faction.'])->addField('ships', ['type' => Connection::connectionDefinition(new ShipType()), 'description' => 'The ships used by the faction', 'args' => Connection::connectionArgs(), 'resolve' => function ($value = null, $args = [], $type = null) {
         return ArrayConnection::connectionFromArray(array_map(function ($id) {
             return TestDataProvider::getShip($id);
         }, $value['ships']), $args);
     }]);
 }
All Usage Examples Of Youshido\GraphQL\Relay\Connection\Connection::connectionArgs