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

Class: GraphQL::Analysis::AST::FieldUsage tracking of used_arguments #4310

Closed
JPrevost opened this issue Jan 26, 2023 · 2 comments
Closed

Class: GraphQL::Analysis::AST::FieldUsage tracking of used_arguments #4310

JPrevost opened this issue Jan 26, 2023 · 2 comments

Comments

@JPrevost
Copy link

JPrevost commented Jan 26, 2023

Is your feature request related to a problem? Please describe.

I've just implemented logging of used fields, used deprecated fields, and used deprecated arguments via GraphQL::Analysis::AST::FieldUsage.

I found myself wanting to also log used arguments (not just the deprecated ones) so we can better understand if we are providing functionality that just isn't needed/used at all.

Describe the solution you'd like

Adding @used_arguments to GraphQL::Analysis::AST::FieldUsage to provide similar functionality to the existing @used_fields, @used_deprecated_fields, @used_deprecated_arguments.

Describe alternatives you've considered

I am currently looking to provide this functionally by inheriting from GraphQL::Analysis::AST::FieldUsage and providing my own methods to enable this feature. Unfortunately, this ends up requiring me to use my own methods for all but one method which made me wonder if this might fit into this project itself.

Additional context

If this would be of interest to this project, I'd be happy to provide additional context as to what I'm doing to provide this functionality to my application as well as possibly submitting a Pull Request.

@rmosolgo
Copy link
Owner

I agree this would be a nice improvement! Please give it a shot and I'll be happy to review a PR.

@rmosolgo
Copy link
Owner

I'd welcome an improvement along these lines but I don't have plans to work on it myself, so I'll close this issue.

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

2 participants