Example #1
0
 // this resolver returns a computer value different than the poco property.
 public string Name(Droid droid) => droid.Name + "fake";
Example #2
0
 // 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"
     });
 }
Example #3
0
 // 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;