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

Function newGraphQLEncoder

query/outputnode_graphql.go:71–77  ·  view source on GitHub ↗

newGraphQLEncoder returns a ready to use graphQLEncoder, given the context and a base encoder

(ctx context.Context, enc *encoder)

Source from the content-addressed store, hash-verified

69
70// newGraphQLEncoder returns a ready to use graphQLEncoder, given the context and a base encoder
71func newGraphQLEncoder(ctx context.Context, enc *encoder) *graphQLEncoder {
72 return &graphQLEncoder{
73 encoder: enc,
74 ctx: ctx,
75 typeAttrId: enc.idForAttr("dgraph.type"),
76 }
77}
78
79// encode creates a JSON encoded GraphQL response.
80func (genc *graphQLEncoder) encode(encInp encodeInput) bool {

Callers 1

toFastJSONMethod · 0.85

Calls 1

idForAttrMethod · 0.80

Tested by

no test coverage detected