graphql-client
graphql-client copied to clipboard
OperationName and Variables Request usage not working !
trafficstars
I need to use the OperationName and Variables to dynamically pass in arguments. when I am executing the query, I am getting syntax errors. When I debug throught the code, I have found that the query object as an array of 3 objects (query itslef, operationName and Variables) . I am really new to c#. I hope someone can help me to overcome this situation.
var request = new GraphQLRequest{
Query = "your query string",
OperationName = "your operation name",
Variables = new {
variable1 = "value for variable1",
variable2 = 1337
}
}
there's a dedicated constructor accepting those as parameters, too.