PrependPath adds the given path item as the first item in the error's path list.
(err error, pathItem interface{})
| 144 | |
| 145 | // PrependPath adds the given path item as the first item in the error's path list. |
| 146 | func PrependPath(err error, pathItem interface{}) error { |
| 147 | gqlErrs := AsGQLErrors(err) |
| 148 | for _, e := range gqlErrs { |
| 149 | e.Path = append([]interface{}{pathItem}, e.Path...) |
| 150 | } |
| 151 | return gqlErrs |
| 152 | } |
no test coverage detected