private object AddDroid(ResolveFieldContext <object> context) { var droid = context.GetArgument <Droid>("droid"); var droidOut = _droidRepository.Add(droid); return(droidOut); }
public DroidMutation(IDataLoaderContextAccessor accessor, IDroidRepository droids) { Field <IntGraphType>( "addDroid", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <DroidInputType> > { Name = "droid" } ), resolve: context => droids.Add(context.GetArgument <Droid>("droid")) ); }
public Droid AddDroid(Droid droid) { return(_droidRepository.Add(droid)); }