ViewConnections

ViewConnections

Overview

All collections in the Finale GraphQL API are accessed via ViewConnection queries. This is a consistent pattern across all data types.

Naming Convention

For any collection {name}, the GraphQL query is {name}ViewConnection.

Examples:

Relay Connection Specification

ViewConnections follow the Relay connection specification, which provides:

  1. Pagination Support: Cursor-based pagination with first, last, after, and before arguments
  2. Edges and Nodes: Results are wrapped in edges containing node objects
  3. Page Info: Metadata about pagination state via pageInfo

Structure

GraphQL

{
  {collection}ViewConnection(
    first: Int
    last: Int
    after: String
    before: String
    sort: [SortInput]
    # Collection-specific filters
  ) {
    edges {
      node {
        # Fields from the collection
      }
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    strategy  # Query execution strategy used
  }
}

Example Query

GraphQL

query {
  productViewConnection(first: 10) {
    edges {
      node {
        productId
        sku
        description
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Why ViewConnections?

This pattern provides: