absinthe-graphql / dataloader

DataLoader for Elixir
MIT License
489 stars 99 forks source link

Safely add distinct on preload_lateral #143

Closed cspeper closed 2 years ago

cspeper commented 2 years ago

Only add a distinct to a query if it does not already have one to avoid:

%Ecto.Query.CompileError{message: "only one distinct expression is allowed in query"
cspeper commented 2 years ago

@benwilson512 @peaceful-james Sorry for the delay and thanks for the feedback! I think I addressed both comments.

benwilson512 commented 2 years ago

@cspeper can you run mix format on the code base so that the CI passes?

cspeper commented 2 years ago

@benwilson512 Looks like the format issue was on master but I went ahead and ran the update. I'll merge once it's approved and passes CI. Thanks!

benwilson512 commented 2 years ago

Ahhh haha then isn't supported on older Elixirs. I'll make a tweak to replace it with a regular function.

cspeper commented 2 years ago

Ahhh haha then isn't supported on older Elixirs. I'll make a tweak to replace it with a regular function.

Ahhh haha then isn't supported on older Elixirs. I'll make a tweak to replace it with a regular function.

Hi @benwilson512 Is there anything more you needed me to do with this PR? It looks like master has the same failure

benwilson512 commented 2 years ago

Ah good point, oK we're good to go then, thanks!