-
Notifications
You must be signed in to change notification settings - Fork 421
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
Allow argument documentation #525
Labels
enhancement
Improvement of existing features or bugfix
Comments
I believe this will be enabled by #441, right @davidpdrsn ? |
Not sure. I will add it as a todo to look into. |
3 tasks
Using attributes to document parametrs would be great! However, it should not hold back #441. If I am not mistaken, it is a backwards-compatible feature, so it can be added in later without breaking any of the code that might already be relying on #441. @davidpdrsn you are the best parson to decide on that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I like to provide clear documentation to my end users about everything in the schema, and this includes arguments.
Describe the solution you'd like
As of Rust 1.39, attributes are allowed on parameters. rust-lang/rfcs#2565.
I would like to see these used to provide documentation for arguments.
Describe alternatives you've considered
We don't need to use
#[doc = ""]
. We could also use a custom attribute.Additional context
Documenting arguments is common. For example, on the GitHub v4 API, everything considered a "Connection" has its arguments clearly documented.
#334 seems to suggest that this works. However, I can't seem to get it to work. Possibly it doesn't work in
#[juniper::object]
macros?The text was updated successfully, but these errors were encountered: