---
title: Relationship type | Wartiva GraphQL API
description: Describes a relationship between two graph object types: the source and target object types, the relationship label, its cardinality, and additional options.
url: https://wartiva.com/api-docs/types/relationship.html
updated: 2026-10-07
---

Graph search · GraphQL type

# `Relationship` type

Describes a relationship between two graph object types: the source and target object types, the relationship label, its cardinality, and additional options.

## Fields

| Field Name | Description |
|---|---|
| `source` - [`GraphObjectType!`](https://wartiva.com/api-docs/types/graph-object-type.html) | The source [GraphObjectType](https://wartiva.com/api-docs/types/graph-object-type.html) of the relationship. |
| `sourceLabel` - [`String!`](https://wartiva.com/api-docs/types/string.html) | A human friendly label for the source [GraphObjectType](https://wartiva.com/api-docs/types/graph-object-type.html) (e.g. "Application"). |
| `relationship` - [`RelationshipType!`](https://wartiva.com/api-docs/types/relationship-type.html) | The relationship label. |
| `relationshipLabel` - [`String!`](https://wartiva.com/api-docs/types/string.html) | A human friendly label for the relationship verb — the [RelationshipType](https://wartiva.com/api-docs/types/relationship-type.html) connecting source to target (e.g. "installed on"). |
| `target` - [`GraphObjectType!`](https://wartiva.com/api-docs/types/graph-object-type.html) | The target [GraphObjectType](https://wartiva.com/api-docs/types/graph-object-type.html) of the relationship. |
| `targetLabel` - [`String!`](https://wartiva.com/api-docs/types/string.html) | A human friendly label for the target [GraphObjectType](https://wartiva.com/api-docs/types/graph-object-type.html) (e.g. "Endpoint"). |
| `invertRelationship` - [`RelationshipType!`](https://wartiva.com/api-docs/types/relationship-type.html) | The label applied to the inverse traversal of the relationship. |
| `invertRelationshipLabel` - [`String!`](https://wartiva.com/api-docs/types/string.html) | A human friendly label for the inverse relationship verb — the [RelationshipType](https://wartiva.com/api-docs/types/relationship-type.html) applied when traversing target to source (e.g. "installs"). |
| `cardinality` - [`RelationshipCardinality!`](https://wartiva.com/api-docs/types/relationship-cardinality.html) | The cardinality of the relationship. |
| `options` - [`RelationshipOptions!`](https://wartiva.com/api-docs/types/relationship-options.html) | Additional attributes that modify the relationship behavior. |
| `targetIs2DPosition` - [`Boolean!`](https://wartiva.com/api-docs/types/boolean.html) | True when the target of the relationship is a PositionSeen object that is itself a 2D geographic position and therefore supports a location filter on geospatial queries. Derived from the target [GraphObjectType](https://wartiva.com/api-docs/types/graph-object-type.html). |
| `label` - [`String!`](https://wartiva.com/api-docs/types/string.html) | A human friendly label for the entire relationship — source noun, verb, and target noun (e.g. "Application installed on Endpoint"). |

## Used by

- [`RelationshipDirected`](https://wartiva.com/api-docs/types/relationship-directed.html) type: A Relationship paired with the RelationshipDirection in which it is traversed from a particular graph object type.

## Example

### Example

```json
{
  "source": "ACCOUNT_POLICY",
  "sourceLabel": "abc123",
  "relationship": "ACTING_AS_GATEWAY_FOR",
  "relationshipLabel": "abc123",
  "target": "ACCOUNT_POLICY",
  "targetLabel": "abc123",
  "invertRelationship": "ACTING_AS_GATEWAY_FOR",
  "invertRelationshipLabel": "xyz789",
  "cardinality": "ONE_TO_ONE",
  "options": RelationshipOptions,
  "targetIs2DPosition": true,
  "label": "xyz789"
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
