how to give graphql arg type code example
Example 1: tyepes and field in typegraphql
@ObjectType()
class Recipe {
@Field()
id: string;
@Field()
title: string;
@Field()
ratings: Rate[];
@Field()
averageRating: number;
}
Example 2: compose graphql query string in c#
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");
Console.WriteLine(await getit.Get<string>(userQuery));