# ConnectionTargetUnion

Source: https://swapcard.dev/exhibitor/leads-api/graphql-exhibitor-api-schema/types/unions/connection-target-union


const [open, setOpen] = useState(startOpen);
  return (
    <details {...(open ? { open: true } : {})} className="details" style={{ border:'none', boxShadow:'none', background:'var(--ifm-background-color)' }}>
      <summary
        onClick={(e) => {
          e.preventDefault();
          setOpen((open) => !open);
        }}
        style={{ listStyle:'none' }}
      >
      {open ? dataOpen : dataClose}
      </summary>
      {open && children}
    </details>
  );
};

Target of a connection. EventPerson is returned when the connection has a communityProfileId. User is returned when the connection has a userId but no communityProfileId (maintained for backward compatibility). Contact is returned for business card scans.

```graphql
union ConnectionTargetUnion = Contact | EventPerson | User
```

### Possible types

#### [<code style={{ fontWeight: 'normal' }}>ConnectionTargetUnion.<b>Contact</b></code>](/exhibitor/leads-api/graphql-exhibitor-api-schema/types/objects/contact.mdx) <Badge class="badge badge--secondary" text="object"/> 

#### [<code style={{ fontWeight: 'normal' }}>ConnectionTargetUnion.<b>EventPerson</b></code>](/exhibitor/leads-api/graphql-exhibitor-api-schema/types/objects/event-person.mdx) <Badge class="badge badge--secondary" text="object"/> 

#### [<code style={{ fontWeight: 'normal' }}>ConnectionTargetUnion.<b>User</b></code>](/exhibitor/leads-api/graphql-exhibitor-api-schema/types/objects/user.mdx) <Badge class="badge badge--secondary" text="object"/> 

### Member Of

[`Connection`](/exhibitor/leads-api/graphql-exhibitor-api-schema/types/objects/connection.mdx)  <Badge class="badge badge--secondary" text="object"/>
