Skip to content

Commit

Permalink
fix(api.champs_loader): n+1
Browse files Browse the repository at this point in the history
  • Loading branch information
mfo committed Dec 18, 2024
1 parent 7ed76c0 commit 63a0e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/graphql/loaders/champ.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def perform(keys)
private

def query(keys)
::Champ.where(@where).where(stable_id: keys)
# ::Champ.where(@where).where(stable_id: keys)
@where[:dossier].champs.filter { |c| c.stable_id.in?(keys) && c.private == @where[:private] }

Check warning on line 25 in app/graphql/loaders/champ.rb

View check run for this annotation

Codecov / codecov/patch

app/graphql/loaders/champ.rb#L25

Added line #L25 was not covered by tests
end
end
end

0 comments on commit 63a0e33

Please sign in to comment.