-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Get generic parameters for a struct field #566
Comments
Hi @oknozor, unfortunately this isn't possible yet, but I have a possible workaround. We're making steady progress toward expressing this in the schema, but I don't have a concrete timeline to offer. I think using a more recent version of the adapter (after #528) might make it so that the generics are printed as part of If the above isn't good enough, I'd recommend grabbing the As for the full solution: modeling Rust types properly in our schema is quite hard: we have to represent everything from If that work is useful to you, I'd appreciate it if you'd consider sponsoring my work! I'd love to pay my rent with this work so I can spend more time doing it ❤ |
Also, not sure if I've already invited you to join the Trustfall / cargo-semver-checks community Discord — here's an invite link just in case: https://discord.gg/HGg95qSf |
Thanks, seems I will be able to parse generics from the raw type field using the latest version. Feels a bit hacky but that will do for now. |
Neat, good luck! |
I am not sure if I am missing something or if this is not possible with the current graphql schema.
Example:
Let's say I have the following struct in my crate:
I now want to query rustdoc like so:
I would get something like that in the query output:
I want to retrieve the HashMap generic parameters to run another query that would retrieve data for
MyConfig
.Context:
I am trying to automate generation of a config reference documentation. initially I tried to use schemars which seemed to fit the usecase perfectly, until I stumble on the same issue with
Map
generics parameter not being parsed (see: GREsau/schemars#124).The text was updated successfully, but these errors were encountered: