Skip to content

Commit

Permalink
fix(query-graphql): Use getById instead of findById to correctly …
Browse files Browse the repository at this point in the history
…throw not found errors
  • Loading branch information
TriPSs committed Oct 28, 2021
1 parent 48cbd63 commit 2b98581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/query-graphql/src/resolvers/read.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export const Readable =
many: false,
})
authorizeFilter?: Filter<DTO>,
): Promise<DTO | undefined> {
return this.service.findById(input.id, { filter: authorizeFilter, withDeleted: opts?.one?.withDeleted });
): Promise<DTO> {
return this.service.getById(input.id, { filter: authorizeFilter, withDeleted: opts?.one?.withDeleted });
}

@ResolverQuery(
Expand Down

0 comments on commit 2b98581

Please sign in to comment.