Files
2026-03-27 08:18:18 -04:00

5 lines
229 B
TypeScript

// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
export function extractNodes<T>(connection: { nodes?: T[] } | null | undefined): T[] {
return connection?.nodes ?? [];
}