public function testConnectionDefinitions() { $nodeType = new ObjectType(['name' => 'test']); $config = ['nodeType' => $nodeType]; $this->assertEquals(Connection::connectionDefinitions($config), Relay::connectionDefinitions($config)); }
/** * Returns a GraphQLObjectType for a connection and its edge with the given name, * and whose nodes are of the specified type. * * @param array $config * @return array */ public static function connectionDefinitions(array $config) { return Connection::connectionDefinitions($config); }
/** * @expectedException \InvalidArgumentException */ public function testConnectionDefinitionThrowsWithoutNodeType() { Connection::connectionDefinitions([]); }