Beispiel #1
0
        private void AddGroupQueries(GroupFacade groupFacade)
        {
            Field <ListGraphType <GroupType> >(
                "allGroups",
                resolve: context => groupFacade.GetAll()
                );

            Field <GroupType>("group",
                              arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                              resolve: context => {
                var id = context.GetArgument <int?>("id");

                return(id != null ? (groupFacade.GetById((int)id)) : null);
            }
                              );
        }