You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see these used to provide documentation for arguments.
#[juniper::object(Context = Context)]implQueryRoot{#[doc = "Ability to document the endpoint already exists"]fnsome_endpoint(context:&Context,#[doc = "Ability to document arguments would be awesome"]id:ID,#[doc = "Only include items in one of these states. Defaults to all states."]states:Option<Vec<StateInput>>) -> SomeObject{todo!()}}
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:
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.
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: