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

Method makeCustomNode

query/outputnode.go:245–253  ·  view source on GitHub ↗

makeCustomNode returns a fastJsonNode that stores the given val for a @custom GraphQL field.

(attr uint16, val []byte)

Source from the content-addressed store, hash-verified

243
244// makeCustomNode returns a fastJsonNode that stores the given val for a @custom GraphQL field.
245func (enc *encoder) makeCustomNode(attr uint16, val []byte) (fastJsonNode, error) {
246 fj := enc.newNode(attr)
247 if err := enc.setScalarVal(fj, val); err != nil {
248 return nil, err
249 }
250 enc.setCustom(fj)
251
252 return fj, nil
253}
254
255const (
256 // Value with most significant bit set to 1.

Callers 1

processCustomFieldsMethod · 0.80

Calls 3

newNodeMethod · 0.95
setScalarValMethod · 0.95
setCustomMethod · 0.95

Tested by

no test coverage detected