Closed Gobot1234 closed 1 month ago
Code The code causing the error.
https://github.com/iforge-uos/ignis/blob/feature/protein-filled-dinner/apps/anvil/src/training/training.service.ts#L39
async getTraining(id: string, editing?: boolean): Promise<training.Training> { const x = e .assert_exists( e.select(e.training.Training, () => ({ ...(editing ? { ...e.training.Training["*"], sections: TrainingSection, } : {...}), enabled: true, rep: { id: true, name: true, description: true }, filter_single: { id }, })), ); console.log(x.toEdgeQL()); }
refs: https://discord.com/channels/841451783728529451/1265373494561083583
Schema
https://github.com/iforge-uos/ignis/tree/feature/protein-filled-dinner/apps/anvil/dbschema/training.esdl
Generated EdgeQL
None, error generated
Error or desired behavior
anvil:dev: 'Error: Field "index" does not exist in training::Question | training::TrainingPage\n' + anvil:dev: ' at shapeToEdgeQL (/Users/James/Programming/ignis/apps/anvil/dbschema/edgeql-js/toEdgeQL.ts:1338:15)\n' + anvil:dev: ' at renderEdgeQL (/Users/James/Programming/ignis/apps/anvil/dbschema/edgeql-js/toEdgeQL.ts:968:11)\n' + anvil:dev: ' at shapeToEdgeQL (/Users/James/Programming/ignis/apps/anvil/dbschema/edgeql-js/toEdgeQL.ts:1375:26)\n' + anvil:dev: ' at Array.map (<anonymous>)\n' + anvil:dev: ' at renderEdgeQL (/Users/James/Programming/ignis/apps/anvil/dbschema/edgeql-js/toEdgeQL.ts:1148:32)\n' + anvil:dev: ' at Proxy.$toEdgeQL (/Users/James/Programming/ignis/apps/anvil/dbschema/edgeql-js/toEdgeQL.ts:319:16)\n' + anvil:dev: ' at TrainingService.getTraining (/Users/James/Programming/ignis/apps/anvil/src/training/training.service.ts:56:8)\n' + anvil:dev: ' at TrainingController.getTraining (/Users/James/Programming/ignis/apps/anvil/src/training/training.controller.ts:41:33)' anvil:dev: ]
Versions (please complete the following information):
2.0
edgedb-js
0.20.10
@edgedb/generate
0.0.7
Code The code causing the error.
https://github.com/iforge-uos/ignis/blob/feature/protein-filled-dinner/apps/anvil/src/training/training.service.ts#L39
refs: https://discord.com/channels/841451783728529451/1265373494561083583
Schema
https://github.com/iforge-uos/ignis/tree/feature/protein-filled-dinner/apps/anvil/dbschema/training.esdl
Generated EdgeQL
None, error generated
Error or desired behavior
Versions (please complete the following information):
2.0
): 5.4+06b93a62.0
): EdgeDB CLI 5.2.0-dev.1166+b5e9df3edgedb-js
version (e.g.0.20.10
;): 1.5.12@edgedb/generate
version (e.g.0.0.7
;): v0.5.3