stash/ui/v2.5/graphql/data/group.graphql
CJ 9b709ef614
Perf: Add lightweight ListGroupData fragment for groups list (#6478)
Create a new ListGroupData fragment that excludes expensive recursive
count fields (scene_count_all, sub_group_count_all, etc. with depth: -1).
These fields cause 10+ second queries on large databases when loading
the groups list page.

The full GroupData fragment is preserved for detail views where the
recursive counts are needed.
2026-01-06 11:48:16 +11:00

83 lines
1.1 KiB
GraphQL

# Full fragment for detail views - includes recursive counts
fragment GroupData on Group {
id
name
aliases
duration
date
rating100
director
studio {
...SlimStudioData
}
tags {
...SlimTagData
}
containing_groups {
group {
...SlimGroupData
}
description
}
synopsis
urls
front_image_path
back_image_path
scene_count
scene_count_all: scene_count(depth: -1)
performer_count
performer_count_all: performer_count(depth: -1)
sub_group_count
sub_group_count_all: sub_group_count(depth: -1)
o_counter
scenes {
id
title
}
}
# Lightweight fragment for list views - excludes expensive recursive counts
# The _all fields (depth: -1) cause 10+ second queries on large databases
fragment ListGroupData on Group {
id
name
aliases
duration
date
rating100
director
studio {
...SlimStudioData
}
tags {
...SlimTagData
}
containing_groups {
group {
...SlimGroupData
}
description
}
synopsis
urls
front_image_path
back_image_path
scene_count
performer_count
sub_group_count
o_counter
scenes {
id
title
}
}