async def get_relationship(
            collection_id: UUID = Path(
                ...,
                description="The collection ID corresponding to the graph containing the relationship.",
            ),
            relationship_id: UUID = Path(
                ..., description="The ID of the relationship to retrieve."
            ),
            auth_user=Depends(self.providers.auth.auth_wrapper()),
        ) -> WrappedRelationshipResponse:
            """Retrieves a specific relationship by its ID."""
            if (
                # not auth_user.is_superuser
                collection_id not in auth_user.collection_ids
            ):
                raise R2RException(
                    "The currently authenticated user does not have access to the collection associated with the given graph.",
                    403,
                )

            results = (
                await self.providers.database.graphs_handler.relationships.get(
                    parent_id=collection_id,
                    store_type=StoreType.GRAPHS,
                    offset=0,
                    limit=1,
                    relationship_ids=[relationship_id],
                )
            )
            if len(results) == 0 or len(results[0]) == 0:
                raise R2RException("Relationship not found", 404)
            return results[0][0]
Retrieves a specific relationship by its ID.
py/core/main/api/v3/graph_router.py