コード例 #1
0
    public StarWarsMutation(StarWarsData data)
    {
        Name = "Mutation";

        Field <HumanType>(
            "createHuman",
            arguments: new QueryArguments(
                new QueryArgument <NonNullGraphType <HumanInputType> > {
            Name = "human"
        }
                ),
            resolve: context =>
        {
            var human = context.GetArgument <Human>("human");
            return(data.AddCharacter(human));
        });
    }