Skip to content

Why not to use attr_accessor for batch_loader? #88

@feruzoripov

Description

@feruzoripov

We have this line https://github.com/exAspArk/batch-loader/blob/master/lib/batch_loader/graphql.rb#L51 and it defines attr_writer :batch_loader. Why not to use attr_accessor :batch_loader instead? Let's say we want to get a loaded item for debugging purposes or for whatever reason, but with the current solution we can't proceed with batch_loader variable or instance_variable_get(:@batch_loader) needs to be run which does not look good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions