-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to adopt example of complex with usage from docs #1009
Comments
Thanks for the detailed report, I'll see if I can untangle it past the point you got. A few questions to help in my investigation:
Can you give some more detail about "same generic error" here since I assume you don't mean "Expr or its aliases used outside of declared 'WITH' block scope" here since that's a query builder error not an error that the server would return.
Just to be clear, if you update your code to use |
I'm attempting to insert video records into edgedb which have links to tags and actors. I'm using the bulk insert method described at https://docs.edgedb.com/libraries/js/for and trying to adapt the complex example near the end to my data model. I'm fairly confident that I've mapped things correctly, and even when I migrate to a simpler data model that more closely matches the docs I get the same problem
Expr or its aliases used outside of declared 'WITH' block scope
. When I do some debugging and comment out that validation I'm able to produce edgeql which fails to execute.Interestingly though, if I put the query directly into the edgedb UI, replace
$videos
with<json>$videos
, then use the following value for the variable, everything works!If I run it a second time I don't get any new tags, actors, or videos. Perfect!
Unfortunately, it does not work if I try to run the same string directly with
client.execute()
orclient.query()
, I get the same generic error without any message mentioned above.The query
Schema
Your application schema.
Generated EdgeQL
Running
.toEdgeQL()
produces the following error:Source:
edgedb-js/packages/generate/src/syntax/toEdgeQL.ts
Lines 276 to 295 in 994470f
If I comment out that code I get the following edgeQL:
Versions (please complete the following information):
OS: macOS Sonoma 14.4.1
EdgeDB version (e.g. 2.0): 5.2+1e07d04
EdgeDB CLI version (e.g. 2.0): 5.0.0+c9dfeec
edgedb-js version (e.g. 0.20.10;): 1.5.4
Node/Deno version: v20.12.2
The text was updated successfully, but these errors were encountered: