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