You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl -q -H "Content-Type: application/json" -X POST "http://localhost:8080/mutate?commitNow=true" -d '{ "set": { "Example.name": "The \"problem\" is the quotes (json)" }}'| jq
curl -q -H "Content-Type: application/json" -X POST "http://localhost:8080/mutate?commitNow=true" -d '{ "set": { "Example.name": "but it is fine without the quotes (json)" }}'| jq
curl -q -H "Content-Type: application/rdf" -X POST "http://localhost:8080/mutate?commitNow=true" -d '{ set { _:v <Example.name> "The \"problem\" is the quotes (rdf)" . }}'| jq
curl -q -H "Content-Type: application/rdf" -X POST "http://localhost:8080/mutate?commitNow=true" -d '{ set { _:v <Example.name> "but it is fine without the quotes (rdf)" . }}'| jq
See errors for mutations 1 and 3:
{
"errors": [
{
"message": "line 1 column 63: Expected comma or language but got: problem",
"extensions": {
"code": "ErrorInvalidRequest"
}
}
],
"data": null
}
Drop all data, including schema and types.
Create the following schema predicate, this time without @unique:
Example.name: string @index(exact, term) .
The data is ingested without any problems
{
result (func: has(Example.name)) {
uid
Example.name
}
}
returns:
{
"data": {
"result": [
{
"uid": "0x19",
"Example.name": "The \"problem\" is the quotes (json)"
},
{
"uid": "0x1a",
"Example.name": "but it is fine without the quotes (json)"
},
{
"uid": "0x1b",
"Example.name": "The \"problem\" is the quotes (rdf)"
},
{
"uid": "0x1c",
"Example.name": "but it is fine without the quotes (rdf)"
}
]
}
}
Expected behavior
All these test queries should succeed.
For the data I'm trying to represent in Dgraph, quotes in Example.name are an allowed character.
Environment
OS: Docker images for both AMD64 and ARM64
Version v24.1.2 and v25.0.0-preview1
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Adding
@unique
to a schema type results in failure to ingest strings that contain double quotes (even though the quotes are escaped).Strings containing single quotes seem to work fine.
To Reproduce
Steps to reproduce the behavior:
docker run --rm -it -p 8080:8080 -p 9080:9080 dgraph/standalone:v24.1.2
orv25.0.0-preview1
)@unique
:returns:
Expected behavior
All these test queries should succeed.
For the data I'm trying to represent in Dgraph, quotes in
Example.name
are an allowed character.Environment
The text was updated successfully, but these errors were encountered: