cayleygraph/cayley · error
HTTP interface is not supported for this query language
Error message
HTTP interface is not supported for this query language
What it means
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.
Source
Thrown at server/http/api_v2.go:530
}
select {
case <-ctx.Done():
errFunc(w, ctx.Err())
return
default:
}
h, err := api.handleForRequest(r)
if err != nil {
errFunc(w, err)
return
}
if l.HTTPQuery != nil {
defer r.Body.Close()
l.HTTPQuery(ctx, h.QuadStore, w, r.Body)
return
}
if l.Session == nil {
errFunc(w, errors.New("HTTP interface is not supported for this query language"))
return
}
ses := l.Session(h.QuadStore)
var qu string
if r.Method == "GET" {
qu = vals.Get("qu")
} else {
data, err := readLimit(r.Body)
if err != nil {
errFunc(w, err)
return
}
qu = string(data)
}
if qu == "" {
jsonResponse(w, http.StatusBadRequest, "query is empty")
return
}View on GitHub (pinned to 81dcd7d73e)
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.
Example fix
// before curl 'http://localhost:64210/v2/query?lang=notalang' --data 'g.V()' // after curl 'http://localhost:64210/v2/query?lang=gremlin' --data 'g.V()'
Defensive patterns
Strategy: validation
Validate before calling
const supported = ["gremlin", "gizmo", "sparql"];
if (!supported.includes(lang)) {
throw new Error(`query language "${lang}" has no HTTP interface`);
} Prevention
- Use only documented query-language values for the /v2/query endpoint.
- Check Cayley release notes for languages that gained/lost HTTP support.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- no support for HTTP interface for this query language
- request is too large
- request is too large
- invalid quad at index %d. %s
- could not get resource <%s>: %v
AI-assisted analysis of cayleygraph/cayley@81dcd7d73e (2026-09-06).
Data as JSON: /api/errors/d8650ff681851ef0.
Report an issue: GitHub.