---
schema_version: "1"
id: 1c4313b7f34717942c49b7e05a95209e5fcf0039edaefff2009d87277f9a38a2
title: ConnectApi.DataGraphRelationship
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_output_data_graph_relationship.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_data_graph_relationship.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f3055c0f14a99eb5f63e35dd937db3e78b854f2bb3584749ab888b97a586dbd3
description: Represents the relationship of a field of the object data for the data graph.
---
# ConnectApi.DataGraphRelationship

Represents the relationship of a field of the object data for the data graph.

<table class="featureTable sort_table" summary="">




          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d934224e46">Property Name</th>

              <th class="featureTableHeader vertical-align-top " id="d934224e49">Type</th>

              <th class="featureTableHeader vertical-align-top " id="d934224e52">Description</th>

              <th class="featureTableHeader vertical-align-top " id="d934224e55">Available Version</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d934224e46" data-title="Property Name"><samp class="codeph apex_code">cardinality</samp></td>

              <td class="entry" headers="d934224e49" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#RelationshipCardinalityEnum">
                  <samp class="codeph apex_code">RelationshipCardinality</samp></a>
              </td>

              <td class="entry" headers="d934224e52" data-title="Description">
                Cardinality of the relationship of a field for object data of the data graph.
                <ul class="ul bulletList">
                  <li class="li"><samp class="codeph apex_code">CardinalityUnspecified</samp></li>
                  <li class="li"><samp class="codeph apex_code">ManyToOne</samp></li>
                  <li class="li"><samp class="codeph apex_code">OneToMany</samp></li>
                  <li class="li"><samp class="codeph apex_code">OneToOne</samp></li>
                </ul>

              </td>

              <td class="entry" headers="d934224e55" data-title="Available Version">59.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d934224e46" data-title="Property Name"><samp class="codeph apex_code">fieldName</samp></td>

              <td class="entry" headers="d934224e49" data-title="Type">String</td>

              <td class="entry" headers="d934224e52" data-title="Description"><span class="ph" id="fieldName"><a name="fieldName"><!-- --></a>Field name of the object data for the data graph.</span></td>

              <td class="entry" headers="d934224e55" data-title="Available Version">59.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d934224e46" data-title="Property Name"><samp class="codeph apex_code">parentFieldName</samp></td>

              <td class="entry" headers="d934224e49" data-title="Type">String</td>

              <td class="entry" headers="d934224e52" data-title="Description"><span class="ph" id="parentFieldName"><a name="parentFieldName"><!-- --></a>Parent field name of the object data for the data graph.</span></td>

              <td class="entry" headers="d934224e55" data-title="Available Version">59.0</td>

            </tr>

          </tbody>

        </table>