// this resolver returns a computer value different than the poco property. public string Name(Droid droid) => droid.Name + "fake";
// these two parameters are optional // ResolveFieldContext provides contextual information about the field public Character Friend(ResolveFieldContext context, Droid source) { return(new Character { Name = $"C3-PO. {this.Name(source)} is my friend" }); }
// this resolver returns the poco class property. It is the default behavior already. No need to define this resolver. public string Id(Droid droid) => droid.Id;