Search code examples
graphql-dotnet

In GraphQl dot net how we can get projected field names from ResolveFieldContext


I am new in Graphql and using graphql-dotnet in my asp.net core project. Consider I have written a query like following.

restaurants { id name }

Now I want to get this field names from ResolveFieldContext. Is there any way to get this filed names?

Expecting your valuable help.


Solution

  • According to https://github.com/graphql-dotnet/graphql-dotnet/issues/903 The solution is we need to use SubFields to get projected fields