diff --git a/errors/errors.go b/errors/errors.go index e35ca2861d9969d9c6ce7d66e69bd112a21217fb..afd3ef70525e02bf6f53ed81803967ef369ae8a9 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -25,8 +25,9 @@ } } // Sets the field name that caused the error -func Field(err *gqlerror.Error, field string) { +func Field(err *gqlerror.Error, field string) *gqlerror.Error { err.Extensions["field"] = field + return err } // Error codes as string constants