Skip to content

Commit

Permalink
fix: handle nested entity id set to null (#269)
Browse files Browse the repository at this point in the history
* fix: accept Int IDs when building subentity where object

* fix: use unique names for nested where type

* fix: handle nested entity id set to null
  • Loading branch information
Sekhmet authored Oct 7, 2023
1 parent ac79462 commit f0ced61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/graphql/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export async function querySingle(

const currentValue = parent?.[info.fieldName];

if (currentValue === null) return null;
const alreadyResolvedInParent = typeof currentValue === 'object';
if (alreadyResolvedInParent) {
return formatItem(currentValue, jsonFields);
Expand Down

0 comments on commit f0ced61

Please sign in to comment.