-
Notifications
You must be signed in to change notification settings - Fork 642
Closed
Description
GraphOptions.joinOperation is typed as required here:
objection.js/typings/objection/index.d.ts
Lines 752 to 758 in 412bb77
| export interface GraphOptions { | |
| minimize?: boolean; | |
| separator?: string; | |
| aliases?: string[]; | |
| joinOperation: string; | |
| maxBatchSize?: number; | |
| } |
which is not correct because it defaults to leftJoin.
In particular, this leads to Typescript error in innocent uses like:
MyModel.query().withGraphFetched("foo", { maxBatchSize: 1 })result:
Argument of type '{ maxBatchSize: number; }' is not assignable to parameter of type 'GraphOptions'.
Property 'joinOperation' is missing in type '{ maxBatchSize: number; }' but required in type 'GraphOptions'.ts(2345)