Skip to content

Commit

Permalink
Merge pull request #432 from kervin5/kv-nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
queicherius authored Apr 8, 2022
2 parents 267a84f + 7372ed8 commit bea03f3
Show file tree
Hide file tree
Showing 4 changed files with 1,437 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export async function findManyCursorConnection<
cursor: encodeCursor(record, options),
} as CustomEdge)
),
nodes: records as unknown[] as Node[],
pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor },
totalCount: totalCount,
}
Expand Down
1 change: 1 addition & 0 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface ConnectionArguments {

// Relay Response
export interface Connection<T, CustomEdge extends Edge<T> = Edge<T>> {
nodes: T[]
edges: Array<CustomEdge>
pageInfo: PageInfo
totalCount: number
Expand Down
Loading

0 comments on commit bea03f3

Please sign in to comment.