Skip to content

Feature Request: Getters of private fields #122

@tnthung

Description

@tnthung

Many types ariadne provided is fully private with their fields, but there's no reason to obfuscate the parts of them. Such as kind, code, etc. from type Report, or span from Label. Getting those values will not affect the work of them, but hiding them would loss many possible opportunities.

Currently I'm working on a project which required some form of wrappers to reduce the boilerplate, one of problem I encounter is the lack of ability to access the span field from Label & unable to retrieve the labels of a Report, which stopped me from automatically generate the list of sources one report required. It's fine to do it manually, but that will make the code way more error-prone.

Maybe make them accessible? Either via pub the fields or some dedicated getter methods for them would be a wonderful thing to have. Appreciate the amazing work of yours.

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