Beispiel #1
0
        public void AddError(string message, RequestObjectBase item, string errorType = ErrorCodes.BadRequest)
        {
            var path = item.GetRequestObjectPath();
            var err  = new GraphQLError(message, path, item.SourceLocation, errorType);

            AddError(err);
        }
        public static void AddInputError(this RequestContext context, string message, RequestObjectBase anchor)
        {
            var path = anchor.GetRequestObjectPath();
            var loc  = anchor.SourceLocation;
            var err  = new GraphQLError(message, path, loc, ErrorCodes.InputError);

            context.AddError(err);
        }