Update package runtime edge ordinal API
This commit is contained in:
Vendored
-5
@@ -308,7 +308,6 @@ const isManyCardinality = (cardinality) => cardinality === "many" ||
|
||||
cardinality === "many_unique" ||
|
||||
cardinality === "many_ordered" ||
|
||||
cardinality === "many_unique_ordered";
|
||||
const isOrderedCardinality = (cardinality) => cardinality === "many_ordered" || cardinality === "many_unique_ordered";
|
||||
const endpointFromOption = (params) => {
|
||||
const object = asObject(params.option);
|
||||
const classRef = asObject(object?.class)
|
||||
@@ -476,10 +475,6 @@ const classSchemaFromType = (type, sourceFile, defaults, operationServices) => {
|
||||
if (!isMany && field.repeated) {
|
||||
throw new Error(`Edge field ${type.fullName}.${field.name} must not be repeated for ${fromEndpoint.cardinality}`);
|
||||
}
|
||||
if (isOrderedCardinality(fromEndpoint.cardinality) &&
|
||||
isOrderedCardinality(toEndpoint.cardinality)) {
|
||||
throw new Error(`Edge field ${type.fullName}.${field.name} cannot be ordered on both endpoints yet`);
|
||||
}
|
||||
const edgeId = symbolRefFromOption(edgeOption.id, {
|
||||
namespace: defaults.schemaNamespace,
|
||||
name: `${type.name}.${field.name}`,
|
||||
|
||||
Reference in New Issue
Block a user