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

Method PostDqlQuery

dgraphapi/cluster.go:677–687  ·  view source on GitHub ↗
(query string)

Source from the content-addressed store, hash-verified

675}
676
677func (hc *HTTPClient) PostDqlQuery(query string) ([]byte, error) {
678 req, err := http.NewRequest(http.MethodPost, hc.dqlURL, bytes.NewBufferString(query))
679 if err != nil {
680 return nil, errors.Wrapf(err, "error building req for endpoint [%v]", hc.dqlURL)
681 }
682 req.Header.Add("Content-Type", "application/dql")
683 if hc.HttpToken != nil {
684 req.Header.Add("X-Dgraph-AccessToken", hc.AccessJwt)
685 }
686 return DoReq(req)
687}
688
689func (hc *HTTPClient) Mutate(mutation string, commitNow bool) ([]byte, error) {
690 url := hc.dqlMutateUrl

Callers 6

queryDuplicateNodesFunction · 0.80
queryUserGroupFunction · 0.80
deleteDuplicatesGroupFunction · 0.80
deleteDuplicatesUserFunction · 0.80
TestSchemaQueryHTTPMethod · 0.80

Calls 2

DoReqFunction · 0.85
AddMethod · 0.45

Tested by 1

TestSchemaQueryHTTPMethod · 0.64