Webtomizer / typeorm-loader

A database-aware data-loader for use with GraphQL and TypeORM.
82 stars 8 forks source link

loadMany doing funny things #1

Closed blocka closed 5 years ago

blocka commented 6 years ago

I'm doing something like this:

    return ctx.loader.loadMany(Teen, {
      graduationYear: 2016
    }, info)

and it generates a query like

SELECT * FROM "teen" "f55b1ba41b66f4091c5ceb47dc4b359b_Teen" LEFT JOIN "teen" "f55b1ba41b66f4091c5ceb47dc4b359b" ON ("f55b1ba41b66f4091c5ceb47dc4b359b"."graduationYear"=2020)

which effectively loads all the "teen" entities from my database, completely ignoring the condition. I'm not quite sure what the idea over here is.

voodooattack commented 6 years ago

That is indeed odd. I will look into it. Thanks for the bug report.

voodooattack commented 5 years ago

Fixed! Sorry for taking so long to fix this.