-
Notifications
You must be signed in to change notification settings - Fork 433
Argument default values and descriptions not available in introspection #880
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
Comments
@mrtnzlml the attribute on a field should be without a prefix: |
@tyranron I just tried to write it like this and it doesn't seem to make any difference: #[juniper::graphql_object]
impl Product {
#[graphql(arguments(first(default = 1, description = "TEST")))]
fn images(&self, first: i32) -> Vec<Image> {
// …
}
// …
} This also makes me think: should it throw some error when I use |
@mrtnzlml it should work, there is a lot of open code proving it works, including integrations tests in this repository. Maybe you miss some step.
Hmm... not sure. What about |
Could you put up a PR with a failing test? As @tyranron mentioned we appear to have tests covering this so there must be something we are missing. |
Yes, would like to do it. However, I still didn't isolate why is it happening. Please, leave this issue open for a bit longer. Thanks! |
Hello, me again! 😅
Describe the bug
Argument default values and descriptions are not available in introspection (and via
as_schema_language
). I followed this syntax: https://graphql-rust.github.io/juniper/master/types/objects/complex_fields.html?highlight=arguments#customizing-argumentsTo Reproduce
Expected behavior
The default value and description should be available via introspection.
Additional context
Here is how the introspection looks like in my case (notice the missing arg description and default value):
The text was updated successfully, but these errors were encountered: