Files
payloadcms/packages/graphql
timeo-schmidt e52b7572c5 fix(graphql): pass collectionSlug to nested join fields in tabs, collapsible and group resolvers (#13752)
## Problem
GraphQL join fields nested inside tabs and collapsibles return empty
results due to missing `collectionSlug` parameter propagation in the
tabs and collapsible resolver.

## Root Cause
The `tabs` resolver in `fieldToSchemaMap.ts` doesn't pass
`collectionSlug` to nested field resolvers, causing polymorphic
relationship queries to fail when constructing MongoDB filters.

## Solution
- Added `collectionSlug` parameter to tabs resolver function signature
- Pass `collectionSlug` to `buildObjectType` for named tabs
- Pass `collectionSlug` to `addSubField` for unnamed tabs

## Testing
- [x] Verified join fields work correctly in tab-nested scenarios
- [x] Tested with multiple collection types
- [x] Confirmed no breaking changes to existing functionality

Fixes #13345  

We have got this running successfully in production and are looking
forward for this to get merged so we do not have to patch the core
anymore :)

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2025-09-09 18:26:17 +00:00
..
2024-03-10 13:53:37 -04:00
2025-09-09 11:59:18 -04:00