Vladimir Dementyev

Results 297 comments of Vladimir Dementyev

> because running with [2, 10, 2, 2] results in: The difference between the first run (N=2 -> 17) and the subsequent runs with the same factor (35) could be...

> I think private method should be called. Yeah, makes sense. Would you like to propose a PR? (Another one 🙂)

> Typically we always add the controller action in a let(:request) { get :action }, so this gem makes us write an exception. Yeah, I experience the same :( >...

I think, this one is very similar to constant queries matcher. Maybe we can extend it like this instead? ```rb expect { subject }.to perform_constant_number_of_queries(exactly: 1) ```

Hey! Could you please show the output when running with the only `NPLUSONE_VERBOSE=1` env var? (w/o filtering) I wonder, which queries have been collected (and why we filtered them all...

> why don't leverage [ActiveSupport::CurrentAttributes](https://api.rubyonrails.org/classes/ActiveSupport/CurrentAttributes.html) instead? I think, mostly to avoid depending on Rails where possible. Although it's not the case right now, but we still want to support other...

Hey @gael-ian! Thanks for the snippet. I see what's going on here: we define the `#authorization_namespace` method right on the class: https://github.com/palkan/action_policy-graphql/blob/58e89be6210213b3369fda05c1a6d5b93b2d339d/lib/action_policy/graphql/behaviour.rb#L25 That's why `include` doesn't work. Agree, this is...

Nope, the code I linked above only affects `authorized?` callbacks—is this your case @gael-ian ? Otherwise, overriding `#authorization_namespace` works fine, see https://github.com/palkan/action_policy-graphql/commit/f0129eb1d0257573ba152cd0196cf1143ed3acbd

Okay, thanks; closing for now; will re-open if the problem occurs again.