Open mrmntte opened 6 months ago
Code The code causing the error.
const listQuery = e.select(e.User, () => ({ limit: 10, // ⚠️ without this the query is generated correctly })) const resolverQuery = e.with([listQuery], e.select({ edges: e.select(listQuery, (scope) => ({ cursor: scope.id, node: e.select(scope, { id: true, handle: true }) })) }))
Generated EdgeQL
WITH __withVar_3 := ( WITH __scope_2_defaultUser := DETACHED default::User SELECT __scope_2_defaultUser { id } LIMIT __withVar_4 ) SELECT { multi edges := ( WITH __withVar_4 := 10, __scope_0_defaultUser := __withVar_3 SELECT __scope_0_defaultUser { single cursor := __scope_0_defaultUser.id, single node := ( WITH __scope_1_defaultUser := __scope_0_defaultUser SELECT __scope_1_defaultUser { id, handle } ) } ) }
*Error:
InvalidReferenceError: object type or alias 'default::__withVar_4' does not exist " 8 | LIMIT __withVar_4", " | ^^^^^^^^^^^",
Versions:
edgedb-js
Duplicate of https://github.com/edgedb/edgedb-js/issues/808
Code The code causing the error.
Generated EdgeQL
*Error:
Versions:
edgedb-js
version: 1.4.1