Skip to content

Lexing error in v2 API #265

@RJKeevil

Description

@RJKeevil

Describe the bug

Hello, i'm in the process of moving to the v2 apis to make use of namespaces. In doing so I am getting lexing errors in queries that previously worked (and still succeed in ratel). I think the json parsing has differences.

To Reproduce

Take the following json from one of our test cases:
{"set":[{"uid":"_:R_1","dgraph.type":["Record","Agg1Record"],"Record.type":"agg1","Record.updateTS":"2025-06-24T08:59:24.894369149Z","Record.identifier":"agg1:BASIC1","Record.dateTime":"2017-02-20T12:00:00Z","Record.raw":"{\"doc\":\"Aggregation Document 1\"}","Record.hash":"3bpk0kclixpif","Record.individualEntity":[{"uid":"_:E_1_1","dgraph.type":["Entity","IndividualEntity"],"IndividualEntity.updateTS":"2025-06-24T08:59:24.894369149Z","IndividualEntity.identifier":"agg1:BASIC1:1","IndividualEntity.full":true,"IndividualEntity.displayName":"Aggregate 1 High","IndividualEntity.nameNormalised":"aggregate 1 high","IndividualEntity.customNameEmbedding":"22ejj75adgi22","IndividualEntity.nameParsed":"{\"initials\":[\"a\",\"h\"],\"raw\":\"aggregate 1 high\",\"words\":[\"aggregate\",\"1\",\"high\"]}","IndividualEntity.graphEmbedding":"te1kunpmfqr8","IndividualEntity.name":"Aggregate 1 High","IndividualEntity.individualID":1}]}]}

In Ratel I get Message: Done

When passing the same string to ns.Client.RunDQL(ctx, ns.Name, mutation) I get:
at line 1 column 1: Unexpected character while lexing DQL: U+0022 '\"'"

Expected behavior

The structure of a set request matched in ratel and v2 api

Environment

  • OS: amazonlinux
  • Language Go
  • Version latest master

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions