{"record":{"id":"b539007a23773804","repo":"cayleygraph/cayley","slug":"no-support-for-http-interface-for-this-query-langu","errorCode":null,"errorMessage":"no support for HTTP interface for this query language","messagePattern":"no support for HTTP interface for this query language","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/http/query.go","lineNumber":101,"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.GetHandleForRequest(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(\"no support for HTTP interface for this query language\"))\n\t\treturn\n\t}\n\n\tpar, _ := url.ParseQuery(r.URL.RawQuery)\n\tlimit, _ := strconv.Atoi(par.Get(\"limit\"))\n\tif limit == 0 {\n\t\tlimit = 100\n\t}\n\n\tses := l.Session(h.QuadStore)\n\tbodyBytes, err := ioutil.ReadAll(r.Body)\n\tif err != nil {\n\t\terrFunc(w, err)\n\t\treturn\n\t}\n\tit, err := ses.Execute(ctx, string(bodyBytes), query.Options{\n\t\tCollation: query.JSON,\n\t\tLimit:     limit,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/cayleygraph/cayley/blob/81dcd7d73e45136bc0d01802a8ba4685d8a533eb/internal/http/query.go#L83-L119","documentation":"Cayley's v1 HTTP query endpoint supports two execution paths: an in-process HTTPQuery handler registered for the query language, or falling back to running the query through a full session. This error is returned when the loaded query language (the \"l\" handler) implements neither — it has no HTTPQuery hook and no Session factory, so the server cannot execute the query over HTTP at all. It is a server capability error, not a malformed request: the query language simply is not wired for HTTP serving.","triggerScenarios":"POSTing a query to /api/v1/query/<lang> where <lang> resolves to a query.Language implementation whose HTTPQuery is nil and whose Session is nil. Typical cases: requesting a query language that was not registered/compiled into the server binary, or a language that only supports programmatic execution and has no HTTP path.","commonSituations":"Running a custom or minimal Cayley build where only some query languages (e.g. Gizmo, GraphQL) are registered but the client requests another; typos in the language name in the URL path; older/newer builds where a language lost HTTP support; embedding Cayley with a custom QuadStore that registers no HTTP query handler.","solutions":["Check the URL language segment against the query languages registered in the running binary (default builds support gizmo/gremlin andgraphql); fix the language name if it is a typo.","Rebuild/upgrade to a Cayley build that registers the desired query language's HTTPQuery or Session support.","If you embed Cayley as a library, register the query language with a non-nil Session or HTTPQuery handler before serving.","As a workaround, run the query through a supported language or via the Go API instead of the HTTP endpoint."],"exampleFix":"// before\ncurl -X POST http://localhost:64210/api/v1/query/mql -d '...'\n// after (use a language the server supports)\ncurl -X POST http://localhost:64210/api/v1/query/gizmo -d 'g.V().All()'","handlingStrategy":"fallback","validationCode":"langs := []string{\"gizmo\", \"gremlin\", \"graphql\"} // check against registered languages\nif !contains(langs, requestedLang) {\n    return fmt.Errorf(\"query language %q not supported over HTTP\", requestedLang)\n}","typeGuard":null,"tryCatchPattern":"resp, err := http.Post(baseURL+\"/api/v1/query/gizmo\", \"application/json\", body)\nif err != nil { return err }\nif resp.StatusCode == http.StatusBadRequest {\n    // fall back to a supported language or the Go API\n}","preventionTips":["Pin the query language name in client config and validate it against the server's supported list at startup.","Keep client and server Cayley versions aligned so language availability matches.","Prefer the documented HTTP-supported languages (gizmo, graphql) for HTTP queries."],"tags":["http","query-language","server-capability","unsupported-feature"],"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"}