question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prefer SubFields vs. SelectionSet

See original GitHub issue

Looks 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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
benmccallumcommented, Oct 10, 2018

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?

1reaction
benmccallumcommented, Mar 27, 2018

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found