-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Hi,
I have implemented a GraphQL server using the GraphQL 2.4 (https://github.com/graphql-dotnet/graphql-dotnet) package, as per this sample: https://www.red-gate.com/simple-talk/dotnet/net-development/building-and-consuming-graphql-api-in-asp-net-core-3-1/
Now I am trying use GraphQL.Client 3.1.4 to execute queries against this server, as per the sample provided at https://github.com/graphql-dotnet/graphql-client. However, I find that the GraphQLResponse.Data is never populated. My response type is defined like this for example query above:
public class AuthorResponse
{
public Author author { get; set; }
}
public class Author
{
public int id { get; set; }
public string firstName { get; set; }
public string lastName { get; set; }
}
Looking at the source code, it appears that the provided serializer, GraphQL.Client.Serializer.Newtonsoft.NewtonsoftJsonSerializer, cannot populate it, unless the response were somehow wrapped in a GraphQLResponse shaped wrapper.
What am I doing wrong?
How is this supposed to work?