Skip to content
← Back to Index

sending Graph Node

Root Set Name: sendings

Fields
categoryStringValue
createdAtDateTimeOffsetValue
dataDynamicFieldsValue
dynamicDynamicFieldsValue
errorMessageStringValue
lastModifiedDateTimeOffsetValue The last time this node was updated. Note that this timestamp does not guarantee any actual changes to the node, but it's guaranteed to update if there are actual changes.
processedAtDateTimeOffsetValue
recipientStringValue
retryCountIntValue
sendingIdUuidValue
sentAtDateTimeOffsetValue
statusClrEnumValue`1
transportClrEnumValue`1
Edges
NameTypeCardinality

Query Sending records through the Graph API to monitor email delivery status, track failures, and analyze communication patterns.

INFO

New to Sendings? See the Sendings resource documentation for an overview of what Sendings are, how they work, and how to create them.

TIP

For a complete field reference, use the Graph metadata endpoint: GET /resources/graph/meta and look for the sending node type.

Common Query Patterns

Monitor Recent Activity

Track recently sent emails across your system:

[ { "edge": "sendings", "filter": "createdAt >= '2025-10-29T00:00:00Z'", "orderBy": "createdAt desc", "limit": 50, "node": { "fields": ["sendingId", "category", "recipient", "status", "createdAt", "sentAt"] } } ]

What this does: Returns the 50 most recent sendings from October 29th onwards, ordered by creation time.

Find Failed Deliveries

Identify emails that failed to deliver:

[ { "edge": "sendings", "filter": "status == 'bounced'", "orderBy": "createdAt desc", "node": { "fields": ["sendingId", "category", "recipient", "errorMessage", "retryCount", "createdAt"] } } ]

What this does: Returns all bounced emails with their error messages and retry counts.

Query by Category

Filter sendings by their category (e.g., password resets, order confirmations):

[ { "edge": "sendings", "filter": "category == 'order_confirmation' and status == 'sent'", "orderBy": "sentAt desc", "limit": 100, "node": { "fields": ["sendingId", "recipient", "sentAt", "dynamic"] } } ]

What this does: Returns the 100 most recently sent order confirmation emails.

Monitor Pending Queue

Check the current queue depth to monitor system health:

[ { "edge": "sendings", "alias": "pending", "filter": "status == 'pending'", "count": true }, { "edge": "sendings", "alias": "recent", "filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'sent'", "count": true } ]

What this does: Returns two counts: pending emails in queue and successfully sent emails today.

Integration with Custom Fields

Sending records include a dynamic field that stores custom data passed when creating the sending. You can define custom Graph fields to query this data:

Define a Custom Field

yaml
uri: /resources/registry/graph/sending/fields/orderId
spec:
  value:
    type: text
    source: dynamic->'orderId'

Query Using Custom Field

[ { "edge": "sendings", "filter": "orderId == '550e8400-e29b-41d4-a716-446655440000'", "node": { "fields": ["sendingId", "recipient", "status", "orderId"] } } ]

What this does: Finds all emails sent related to a specific order.

Working with Status Values

The status field tracks the lifecycle of each sending:

  • pending: Queued, waiting to be processed
  • sent: Successfully delivered to mail server
  • bounced: Delivery failed after retries exhausted
  • cancelled: Cancelled before processing (via REST API)

The cancelledAt field stores the timestamp when a sending was cancelled. Only pending sendings can be cancelled using the DELETE /resources/sendings/{id} REST endpoint.

Example: Monitoring delivery rates

[ { "edge": "sendings", "alias": "sent", "filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'sent'", "count": true }, { "edge": "sendings", "alias": "bounced", "filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'bounced'", "count": true }, { "edge": "sendings", "alias": "pending", "filter": "createdAt >= '2025-10-29T00:00:00Z' and status == 'pending'", "count": true } ]

Transport Types

The transport field indicates the communication channel:

  • email: Email delivery (currently supported)
  • sms: SMS delivery (future)
  • push: Push notification (future)

Currently, only email transport is implemented.

Authorization

Required Permissions:

graph/sending:query       # Query sendings
graph/sending:field       # Access individual fields

INFO

See Access Control for more on permission patterns.

Cancelled Sendings

Query cancelled sendings to track cancellation activity:

[ { "edge": "sendings", "filter": "status == 'cancelled'", "orderBy": "cancelledAt desc", "limit": 20, "node": { "fields": ["sendingId", "recipient", "category", "createdAt", "cancelledAt"] } } ]

What this does: Returns the 20 most recently cancelled sendings.

© 2024 Hantera AB. All rights reserved.