MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / PrependPath

Function PrependPath

graphql/schema/errors.go:146–152  ·  view source on GitHub ↗

PrependPath adds the given path item as the first item in the error's path list.

(err error, pathItem interface{})

Source from the content-addressed store, hash-verified

144
145// PrependPath adds the given path item as the first item in the error's path list.
146func 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}

Callers 1

rewriteAndExecuteMethod · 0.92

Calls 1

AsGQLErrorsFunction · 0.85

Tested by

no test coverage detected