Answers for "compose graphql query string in c#"

C#
0

compose graphql query string in c#

// Setup Getit, config and a couple of queries

Config config = new Config("https://randy.butternubs.com/graphql");
Getit getit = new Getit(config);
IQuery userQuery = getit.Query();

userQuery
    .Name("User")
    .Select("userId", "firstName", "lastName", "phone")
    .Where("userId", "331")
    .Where("lastName", "Calhoon")
    .Comment("My First Getit Query");

// Fire the request to the sever as specified by the config

Console.WriteLine(await getit.Get<string>(userQuery));
Posted by: Guest on March-09-2020

C# Answers by Framework

Browse Popular Code Answers by Language