mirror of
https://github.com/stashapp/stash.git
synced 2026-01-26 10:07:16 +01:00
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.
83 lines
1.1 KiB
GraphQL
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
|
|
}
|
|
}
|