edgedb-js
edgedb-js copied to clipboard
Exported variable 'fooQuery' has or is using name 'typenameSymbol' from external module but cannot be named
Code I'm trying to define a function that generates a query, such as:
export const caseQuery = (issueId: string) =>
e.select(e.issue.Issue, () => ({
id: true,
openedAt: true,
closedAt: true,
title: true,
documents: document => ({
id: true,
name: true,
createdAt: true,
participant: true,
dataType: true,
order_by: document.createdAt,
}),
filter_single: { id: issueId },
}));
This previously seemed to work just fine with edgedb version 1.5.3, but breaks after updating to 2.0.1. I believe this PR is the culprit, as it adds the mentioned typenameSymbol stuff.
The error is as follows:
Exported variable 'caseQuery' has or is using name 'typenameSymbol' from external module "/workspace/src/ts/packages/gel/src/edgeql/path" but cannot be named. ts(4023)
(where packages/gel/src/edgeql is the codegen folder from edgedb generate edgeql-js).
The issue appears to pop up specifically when using the nested subquery for documents (or any subquery like that) - the error disappears after removing that field.
Schema
Too big to list here.
Generated EdgeQL
N/A
Error or desired behavior
Versions (please complete the following information):
- EdgeDB version: 5.6
gel-jsversion: 2.0.1@gel/generateversion: 0.6.2- TypeScript version: 5.5