Skip to content
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

Pure C API doesn't provide a way to access individual list-style subnodes #34

Closed
martinandert opened this issue May 28, 2016 · 1 comment

Comments

@martinandert
Copy link

For example: Given I have a handle to a GraphQLAstSelectionSet, I can access the number of selections contained within it by calling GraphQLAstSelectionSet_get_selections_size. But how do I get a handle to a specific selection in the list? Is there a way to enumerate the selections contained within the selection set without resorting to visitors?

This also applies to other nodes with subnode lists, e.g. Document -> definitions, FragmentSpread -> directives etc.

Disclaimer: As I'm fairly new to all this stuff, I may be missing something really obvious here.

@swolchok
Copy link
Contributor

Is there a way to enumerate the selections contained within the selection set without resorting to visitors?

The intent is to use a visitor. Without a visitor, you would have no way to determine the actual type (Field, FragmentSpread, or InlineFragment) of each of the selections in the GraphQLAstSelectionSet (GraphQLAstSelection is an abstract type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants