Skip to content

Commit

Permalink
perf(core): Fix slow order query for postgres v16
Browse files Browse the repository at this point in the history
Fixes #3037
  • Loading branch information
michaelbromley committed Aug 28, 2024
1 parent d267e73 commit 1baa8e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/core/src/api/resolvers/admin/order.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ import { Transaction } from '../../decorators/transaction.decorator';

@Resolver()
export class OrderResolver {
constructor(private orderService: OrderService, private connection: TransactionalConnection) {}
constructor(
private orderService: OrderService,
private connection: TransactionalConnection,
) {}

@Query()
@Allow(Permission.ReadOrder)
Expand All @@ -63,7 +66,8 @@ export class OrderResolver {
async order(
@Ctx() ctx: RequestContext,
@Args() args: QueryOrderArgs,
@Relations(Order) relations: RelationPaths<Order>,
@Relations({ entity: Order, omit: ['aggregateOrder', 'sellerOrders'] })
relations: RelationPaths<Order>,
): Promise<Order | undefined> {
return this.orderService.findOne(ctx, args.id, relations);
}
Expand Down

0 comments on commit 1baa8e7

Please sign in to comment.