Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Getters of private fields #122

Open
tnthung opened this issue Jul 17, 2024 · 0 comments
Open

Feature Request: Getters of private fields #122

tnthung opened this issue Jul 17, 2024 · 0 comments

Comments

@tnthung
Copy link

tnthung commented Jul 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant