File tree 1 file changed +15
-5
lines changed
packages/twenty-server/src/engine/api/graphql/workspace-query-runner
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -583,12 +583,22 @@ export class WorkspaceQueryRunnerService {
583
583
) } ;
584
584
` ) ;
585
585
586
- const results = await workspaceDataSource ?. query < PGGraphQLResult > (
587
- `SELECT graphql.resolve($1);` ,
588
- [ query ] ,
589
- ) ;
586
+ return await workspaceDataSource ?. transaction (
587
+ async ( transactionManager ) => {
588
+ await transactionManager . query ( `
589
+ SET search_path TO ${ this . workspaceDataSourceService . getSchemaName (
590
+ workspaceId ,
591
+ ) } ;
592
+ ` ) ;
590
593
591
- return results ;
594
+ const results = transactionManager . query < PGGraphQLResult > (
595
+ `SELECT graphql.resolve($1);` ,
596
+ [ query ] ,
597
+ ) ;
598
+
599
+ return results ;
600
+ } ,
601
+ ) ;
592
602
}
593
603
594
604
private async parseResult < Result > (
You can’t perform that action at this time.
0 commit comments