Prefer SubFields vs. SelectionSet
See original GitHub issueLooks like a pretty cool library!
Not sure if it is well known, but the ResolveFieldContext
does have a SubFields
property which is the fields that should be requested. It looks like that Dapper.GraphQL
may have a bug in that even though a field is in the SelectionSet
, it may not necessarily be allowed to be returned (due to directives mainly).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Field selection
Field selection occurs when you have a compound type (an object or interface type) and you select a set of sub fields from...
Read more >Field \"me\" of type \"User\" must have a selection of subfields
To fix it, just change your request to include name like this: { me { name } } ... or age . Or...
Read more >Hot Chocolate Field Selection : r/graphql
net core and am not having any luck on how to get the selection set from the query. Is there an easy way...
Read more >ArcObjects queries using selection set - vb.net
I'm new to ArcObjects and I'm finding it difficult to work with the ArcObjects 'Feature ... The query code runs something like this....
Read more >Type \"[ArrayResult]\" must have a selection of subfields error
I'm unsure how to proceed, and can't seem to find this type of scenario mentioned in the Parse docs. I'd like to return...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @joemcbride, I’m currently re-visiting this TODO and wondering… is it possible now to get the SubFields of the SubFields yet? Doesn’t look like it as
Field
doesn’t have a SubFields prop yet. Should I create an issue in the GraphQL repo, or is this just flat out impossible?If I just use SelectionSet, it seems like it still only gives you what was asked in the query, so are you saying that directives are the only graphql feature that should would make SubFields and SelectionSet different? Or are there other cases?
Another note for this change @dougrday , looks like when you upgrade to a later version of GraphQL that GraphQL.Type.Schema.ResolveType has been deprecated in favour of using the DependencyResolver property which is no longer a func but a concrete type implementing GraphQL.IDependencyResolver, so the docs/example will need to update similarly.
@joemcbride, is there a default one configured for asp.net core servicesCollection or do we just need to set the DependencyResolver to a barebones class that calls asp.net core’s serviceProvider anyway?