Add support for satellite graphs in graph API
Release notes: https://www.arangodb.com/docs/stable/release-notes-new-features37.html#satellitegraphs
Looking at the documentation for the HTTP API, it is not gonna be straightforward to include. They use the existing replicationFactor attribute to identify creation of satellite graphs.
replicationFactor: The replication factor used when initially creating collections for this graph. Can be set to "satellite" to create a SatelliteGraph, which will ignore numberOfShards, minReplicationFactor and writeConcern (Enterprise Edition only).
https://www.arangodb.com/docs/stable/http/gharial-management.html
Took a peek at the java driver implementation. They use a dedicated class to represent the replication factor:
https://github.com/arangodb/arangodb-java-driver/blob/f75985b35693b793dfc3c4fe4663653a34919bba/src/main/java/com/arangodb/entity/ReplicationFactor.java#L26
You might also want to consider the alternative approach adopted in the upcoming reactive Java driver, which has an interface ReplicationFactor and 2 implementations NumericReplicationFactor and SatelliteReplicationFactor.
However this is possible because Java allows covariant return types for overridden methods, but this is only possible from C# 9. Maybe with previous versions you can achieve something similar returning a covariant generic.
https://github.com/arangodb/arangodb-java-driver/blob/next/arangodb-java-driver/src/main/java/com/arangodb/next/api/entity/ReplicationFactor.java
https://github.com/arangodb/arangodb-java-driver/blob/next/arangodb-java-driver/src/main/java/com/arangodb/next/api/entity/SatelliteReplicationFactor.java
https://github.com/arangodb/arangodb-java-driver/blob/next/arangodb-java-driver/src/main/java/com/arangodb/next/api/entity/NumericReplicationFactor.java
Thanks for the tip @rashtao !
Another approach would be to create a separate method, e.g. PostSatelliteGraph. This would be really easy to implement, but it would not have a one to one relationship with a specific route contrary to other methods.
@DiscoPYF , what if we change the type of ReplicationFactor to object and then add some validation in PostGraphAsync()?