Currently async_graphql::context::SelectionField will give you access to the field name, alias, arguments, and child fields through the selection_set. This all works very well, and I am able to return arbitrarily complex selection sets for my project Sudograph. Sudograph is a GraphQL database for the Internet Computer, it is designed in a particular way probably not common to how GraphQL is normally used with traditional databases like Postgres/MySQL/MongoDB. I just bring this up in case you're questioning why I need this functionality.
I am missing a key part of the selection set, which is the object type from the schema that the current selection set or field belongs to. I need this information to implement searching/filtering on relations within a selection set, and without it being available to me in async_graphql::context::SelectionField I believe I am going to have to get the SDL from the schema, parse it into an AST, and manually walk it to find the object types that I need. I think this will work fine, but it will be a lot of extra work and processing when a simple object_type_name method available on async_graphql::context::SelectionField would save me all of that trouble.
Currently
async_graphql::context::SelectionFieldwill give you access to the field name, alias, arguments, and child fields through theselection_set. This all works very well, and I am able to return arbitrarily complex selection sets for my project Sudograph. Sudograph is a GraphQL database for the Internet Computer, it is designed in a particular way probably not common to how GraphQL is normally used with traditional databases like Postgres/MySQL/MongoDB. I just bring this up in case you're questioning why I need this functionality.I am missing a key part of the selection set, which is the object type from the schema that the current selection set or field belongs to. I need this information to implement searching/filtering on relations within a selection set, and without it being available to me in
async_graphql::context::SelectionFieldI believe I am going to have to get the SDL from the schema, parse it into an AST, and manually walk it to find the object types that I need. I think this will work fine, but it will be a lot of extra work and processing when a simpleobject_type_namemethod available onasync_graphql::context::SelectionFieldwould save me all of that trouble.