{"record":{"id":"d8650ff681851ef0","repo":"cayleygraph/cayley","slug":"http-interface-is-not-supported-for-this-query-lan","errorCode":null,"errorMessage":"HTTP interface is not supported for this query language","messagePattern":"HTTP interface is not supported for this query language","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/http/api_v2.go","lineNumber":530,"sourceCode":"\t}\n\tselect {\n\tcase <-ctx.Done():\n\t\terrFunc(w, ctx.Err())\n\t\treturn\n\tdefault:\n\t}\n\th, err := api.handleForRequest(r)\n\tif err != nil {\n\t\terrFunc(w, err)\n\t\treturn\n\t}\n\tif l.HTTPQuery != nil {\n\t\tdefer r.Body.Close()\n\t\tl.HTTPQuery(ctx, h.QuadStore, w, r.Body)\n\t\treturn\n\t}\n\tif l.Session == nil {\n\t\terrFunc(w, errors.New(\"HTTP interface is not supported for this query language\"))\n\t\treturn\n\t}\n\tses := l.Session(h.QuadStore)\n\tvar qu string\n\tif r.Method == \"GET\" {\n\t\tqu = vals.Get(\"qu\")\n\t} else {\n\t\tdata, err := readLimit(r.Body)\n\t\tif err != nil {\n\t\t\terrFunc(w, err)\n\t\t\treturn\n\t\t}\n\t\tqu = string(data)\n\t}\n\tif qu == \"\" {\n\t\tjsonResponse(w, http.StatusBadRequest, \"query is empty\")\n\t\treturn\n\t}","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/cayleygraph/cayley/blob/81dcd7d73e45136bc0d01802a8ba4685d8a533eb/server/http/api_v2.go#L512-L548","documentation":"ServeQuery dispatches to a query language's registered listener. If the language declares neither an HTTPQuery hook nor a Session factory (l.Session == nil), Cayley cannot execute the query over HTTP and returns this error via errFunc. It means the chosen query language simply has no HTTP interface wired up.","triggerScenarios":"Issuing an HTTP request to /v2/query with a query-language parameter selecting a language whose Listener has no HTTPQuery function and no Session constructor.","commonSituations":"Typo or unsupported value in the query language parameter of the request; using a query language registered only for internal/programmatic use; version where the language's HTTP support was removed or not yet added.","solutions":["Use a supported query language value for HTTP queries (e.g. gremlin/gizmo or sparql) instead of the current one.","Check the spelling/case of the query language parameter in the request URL or form values.","Verify in the server version's language registry that the language implements HTTPQuery or Session; upgrade Cayley if a newer version adds HTTP support.","Execute the query programmatically via the Go API instead of the HTTP endpoint."],"exampleFix":"// before\ncurl 'http://localhost:64210/v2/query?lang=notalang' --data 'g.V()'\n// after\ncurl 'http://localhost:64210/v2/query?lang=gremlin' --data 'g.V()'","handlingStrategy":"validation","validationCode":"const supported = [\"gremlin\", \"gizmo\", \"sparql\"];\nif (!supported.includes(lang)) {\n  throw new Error(`query language \"${lang}\" has no HTTP interface`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only documented query-language values for the /v2/query endpoint.","Check Cayley release notes for languages that gained/lost HTTP support."],"tags":["http","query-language","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"81dcd7d73e45136bc0d01802a8ba4685d8a533eb","analyzedAt":"2026-09-06T06:14:12.358Z","contentChangedAt":"2026-09-06T06:14:12.358Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}