palkan/action_policy-graphql

Modules reloading works incorrectly in development

rzaharenkov opened this issue · 1 comments

It works as expected in production (with enabled eager loading). But I'm having difficulties in development when I change any file in app/graphql it starts to fail with the following error:

error: "NoMethodError"
message: "undefined method `expose_authorization_rules' for Types::ResourceType:Class"

Tell us about your environment

Ruby Version: 2.6.6

Framework Version (Rails, whatever): 5.2

Action Policy Version: 0.5.1

Action Policy GraphQL Version: 0.5.3

What did you do?

Changing code in app/graphql while running rails server in development mode.

What did you expect to happen?

Method expose_authorization_rules can be used to expose resource authentication rules.

What actually happened?

Getting NoMethodError exception.

Released in 0.5.2.