Login
Free Sign Up
Docs
/

Object - Query Link

Type identifier: object:queryLink Category: Object Operations

Description

Queries relationships between Records to find linked Records. Given either a source Record or target Record, finds the corresponding linked Record via a specific relationship type. Returns Record IDs for further processing.

Input Handles

Handle

Data Type

Required

Description

from

string

No

Source Record ID for forward lookup

to

string

No

Target Record ID for reverse lookup

Input Handle Details

from

  • Type: string (CUID2)
  • Notes:

    • When provided, finds the linked toId
    • Used for forward relationship traversal
    • If null or non-string, returns null for toId

to

  • Type: string (CUID2)
  • Notes:

    • When provided, finds the linked fromId
    • Used for target-side relationship traversal
    • If null or non-string, returns null for fromId

Output Handles

Handle

Data Type

Description

fromId

string

Source Record ID from reverse lookup

toId

string

Target Record ID from forward lookup

Output Handle Details

fromId

  • Type: string or null
  • Notes:

    • Populated when to input is provided
    • Returns first matching source Record ID
    • Returns null if no relationship found

toId

  • Type: string or null
  • Notes:

    • Populated when from input is provided
    • Returns first matching target Record ID
    • Returns null if no relationship found

Configuration Options

Property

Type

Required

Default

Description

label

string

Yes

"Object - Query Link"

Display label for the node

schemaId

string

Yes

""

Schema ID (for filtering)

relationshipVersionId

string

Yes

""

CUID2 of the relationship version

Configuration Details

relationshipVersionId

  • Type: string (CUID2)
  • Notes:

    • References a Schema relationship version
    • Determines the relationship type to query
    • Must be a valid relationship in the Space

Behaviour

Execution Flow

For fromId output (reverse lookup):

  1. Resolves to input handle
  2. Validates input is a string
  3. Finds the source Record of the relationship in the current Space
  4. Returns first matching source Record ID or null

For toId output (forward lookup):

  1. Resolves from input handle
  2. Validates input is a string
  3. Finds the target Record of the relationship in the current Space
  4. Returns first matching target Record ID or null

Matching Rules

A relationship matches only when:

  • Relationship version matches
  • Relationship is not removed
  • Both source and target Schemas are in the current Space
  • Schema versions are not removed

Result Handling

Scenario

Behaviour

Input is null

Returns null

Input is not a string

Returns null

No relationship found

Returns null

Multiple relationships

Returns first match

Examples

Forward Lookup (From → To)

{
  "type": "object:queryLink",
  "data": {
    "label": "Get Customer for Order",
    "schemaId": "order-schema-uuid",
    "relationshipVersionId": "order-customer-rel-uuid"
  }
}

Given an order ID in from input, returns the customer ID in toId output.

Reverse Lookup (To → From)

{
  "type": "object:queryLink",
  "data": {
    "label": "Get Orders for Customer",
    "schemaId": "order-schema-uuid",
    "relationshipVersionId": "order-customer-rel-uuid"
  }
}

Given a customer ID in to input, returns an order ID in fromId output.

Chained Relationship Query

{
  "type": "object:queryLink",
  "data": {
    "label": "Find Parent Category",
    "schemaId": "category-schema-uuid",
    "relationshipVersionId": "category-parent-rel-uuid"
  }
}

Chaining multiple Object - Query Link nodes navigates hierarchical relationships.

Related pages