Skip to content

GraphQL query and C# #1732

Closed Answered by seantleonard
BumpaRoy asked this question in Q&A
Sep 20, 2023 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

This seems to be an issue with how Newtonsoft.Json deserializes the response into your RootObject class, and not something that you need to configure within DAB.
Troubleshooting suggestion 1:

I think that your Data class needs to change because the GraphQL response property products is not a list, it's the name of the GraphQL query you defined in your request:

public class RootObject
{
    public Products products { get; set; }
}

I'm skipping the class Data because that class doesn't look to be used in the GraphQL.net library you use for deserializing a GraphQL response into a particular object.

More example code that your GraphQL client provides: https://github.com/graphql-dotnet/graphql…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@BumpaRoy
Comment options

@BumpaRoy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@BumpaRoy
Comment options

@BumpaRoy
Comment options

@seantleonard
Comment options

Answer selected by BumpaRoy
@BumpaRoy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants