Function getRelationFromKey

  • Retrieves the relation definition schema from the given key.

    Reverse operation from getRelationKey.

    Parameters

    • relationKey: string

      The relation key generated with getRelationKey

    • schema: Schema<EntityRawSchemaArray, RelationDefinitionRawSchemaArray<EntityRawSchemaArray>> | EntitySchema<EntityRawSchemaArray, RelationDefinitionRawSchemaArray<EntityRawSchemaArray>, EntityRawSchema>

      The CubicWeb schema

    Returns RelationDefinitionSchema<EntityRawSchemaArray, RelationDefinitionRawSchemaArray<EntityRawSchemaArray>, Readonly<Object>>

    The relation definitio schema represented by the given key in the schema

    Throws

    Error if no relation could be found from the given key

Generated using TypeDoc