edgedb-ui
edgedb-ui copied to clipboard
UI broke after adding a alias expression to the schema
Added a alias expression and the ui broke, returns this:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setLoadingTab')
at t.<anonymous> (index.ts:761:13)
at c (runtime.js:63:40)
at Generator._invoke (runtime.js:294:22)
at Generator.next (runtime.js:119:21)
at Qe (action.ts:68:19)
at t._fetchData (action.ts:49:16)
at t.u (wrapInAction.ts:94:19)
at n (modelFlow.ts:77:14)
at modelFlow.ts:157:56
at new Promise (<anonymous>)
The expression is an array of enum values, like:
scalar type Status extending enum<open, close, locked>;
alias BadStatus := <array<Status>>[ Status.locked, Status.closed ];
this line
What version of EdgeDB are you using? This bug may have been fixed in this PR: https://github.com/edgedb/edgedb-ui/pull/94.
What version of EdgeDB are you using? This bug may have been fixed in this PR: #94.
v2.9+b1d697b
Still happens in v2.12+5454e58
create migration {
create scalar type Status extending enum<open, closed, locked>;
create alias BadStatus := <array<Status>>[ Status.locked, Status.closed ];
};
Data explorer throws an error:
Uncaught (in promise) Error: unknown type: null
at $d (index.ts:398:15)
at t.<anonymous> (database.ts:233:13)
at c (runtime.js:63:40)
at Generator._invoke (runtime.js:294:22)
at Generator.next (runtime.js:119:21)
at Qe (action.ts:68:19)
at t.fetchSchemaData (action.ts:49:16)
at t.u (wrapInAction.ts:94:19)
at n (modelFlow.ts:77:14)