We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f92fea4 commit e042bd7Copy full SHA for e042bd7
packages/server/src/api/rest/index.ts
@@ -1897,8 +1897,13 @@ class RequestHandler extends APIHandlerBase {
1897
if (error) return { select: undefined, error };
1898
1899
if (i !== parts.length - 1) {
1900
- currPayload[relation] = { include: { ...currPayload[relation]?.include } };
1901
- currPayload = currPayload[relation].include;
+ if (select) {
+ currPayload[relation] = { select: { ...select } };
1902
+ currPayload = currPayload[relation].select;
1903
+ } else {
1904
+ currPayload[relation] = { include: { ...currPayload[relation]?.include } };
1905
+ currPayload = currPayload[relation].include;
1906
+ }
1907
} else {
1908
currPayload[relation] = select
1909
? {
0 commit comments