You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
I believe where should use the same type for querying as TypeORM (FindManyOptions<Entity> or FindOneOptions<Entity>). Is this correct? If so, I'd be happy to submit a PR updating it.
The text was updated successfully, but these errors were encountered:
@EirikFA The loader actually uses the QueryBuilder API under the hood which uses this as the type signature:
// From TypeORM type definitions/** * Sets WHERE condition in the query builder. * If you had previously WHERE expression defined, * calling this function will override previously set WHERE conditions. * Additionally you can add parameters used in where expression. */where(where: Brackets|string|((qb: this)=>string)|ObjectLiteral|ObjectLiteral[],parameters?: ObjectLiteral): this;
I agree that the typing for the where argument should be better, and I have already improved it in a refactor of the package that I am actually working on as we speak :) If you would like a preview of what that will look like, please check out https://gql-loader.bmuller.net/ for the WIP documentation & types of the refactored package. There is still a bit of cleanup required there to get everything in line with how TypeORM types their stuff, but it is close to what the final result will be. At the end of the day, the where method of the dataloader will match the type signature of the where method in the TypeORM query builder.
I believe
where
should use the same type for querying as TypeORM (FindManyOptions<Entity>
orFindOneOptions<Entity>
). Is this correct? If so, I'd be happy to submit a PR updating it.The text was updated successfully, but these errors were encountered: