Browse Source

fix(core): ListQueryOptions type detects nullable fields on entity

Fixes #1834
Michael Bromley 3 years ago
parent
commit
d6e56963f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/common/types/common-types.ts

+ 1 - 1
packages/core/src/common/types/common-types.ts

@@ -86,7 +86,7 @@ export type SortOrder = 'ASC' | 'DESC';
 
 // prettier-ignore
 export type PrimitiveFields<T extends VendureEntity> = {
-    [K in keyof T]: T[K] extends LocaleString | number | string | boolean | Date ? K : never
+    [K in keyof T]: NonNullable<T[K]> extends LocaleString | number | string | boolean | Date ? K : never
 }[keyof T];
 
 // prettier-ignore