Skip to Content

Attachment

Represents a file or link attached to a product.

Type Definition

type Attachment { name: String href: String }

Fields

FieldTypeDescriptionNullableRelationship
nameStringThe display name of the attachmentYesNone
hrefStringThe URL or path to the attachmentYesNone

Relationships

The Attachment type does not have direct relationships to other object types. It is typically used as a nested object within other types, such as a product, to represent associated files or links.

Usage Examples

Basic Query

{ attachment { name href } }

Field Selection

{ attachment { name } }
{ attachment { href } }

Nested Queries

Assuming Attachment is a field on a Product type:

{ product(id: 12345) { id title attachment { name href } } }

Filtering and Sorting

The Attachment type itself does not support filtering or sorting as it only contains scalar fields and is typically nested within other types. Filtering and sorting should be applied on the parent type (e.g., Product).

Implements

The Attachment type does not implement any interfaces.

Connections

The Attachment type does not have connection fields.

  • Product (commonly contains Attachment as a nested field)

Best Practices

  • Use the name field to provide a human-readable label for the attachment.
  • Use the href field to store a fully qualified URL or relative path to the file or link.
  • When querying attachments, select only the fields you need to optimize response size.
  • Since attachments are often nested, consider querying them only when necessary to reduce payload.

Notes

  • Both name and href fields are optional and may be null if no attachment data is available.
  • The API currently requires no authentication, but this may change in future versions.
  • Attachments are static references; no computed or derived fields are defined on this type.
  • There are no field arguments on Attachment.
  • Performance considerations generally depend on the parent object; querying attachments alone is lightweight.
  • Cache attachment URLs and names on the client side when possible to reduce repeated network requests.
Last updated on