fluree / core

Fluree releases and public bug reports
0 stars 0 forks source link

"union" (and other where-clause keywords appearing in maps) have string/keyword issues #14

Closed aaj3f closed 1 year ago

aaj3f commented 1 year ago

Description

Queries that involve where-clause syntax like union, filter, and optional (against http-api-gateway instances) throw a malformed application/json 500 error:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Malformed application/json in :muuntaja/encode</title>
</head>
<body><h2>HTTP ERROR 500 Malformed application/json in :muuntaja/encode</h2>
<table>
<tr><th>URI:</th><td>/fluree/query</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Malformed application/json in :muuntaja/encode</td></tr>
<tr><th>SERVLET:</th><td>org.eclipse.jetty.servlet.ServletHandler$Default404Servlet-162c89ac</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 11.0.14</a><hr/>

</body>
</html>

Take for example the following query:

{
    "ledger": "cookbook/base",
    "query": {
        "select": "?name",
        "where": [
            {"union": [
                [["?s", "schema:name", "?name"]],
                [["?s", "ex:nickname", "?name"]]
            ]}
        ]
    }
}
cap10morgan commented 1 year ago

This is implicitly what I'm currently working on.