edgedb-ui icon indicating copy to clipboard operation
edgedb-ui copied to clipboard

UI broke after adding a alias expression to the schema

Open lu-zen opened this issue 3 years ago • 3 comments

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

lu-zen avatar Jan 20 '23 01:01 lu-zen

What version of EdgeDB are you using? This bug may have been fixed in this PR: https://github.com/edgedb/edgedb-ui/pull/94.

jaclarke avatar Jan 23 '23 16:01 jaclarke

What version of EdgeDB are you using? This bug may have been fixed in this PR: #94.

v2.9+b1d697b

lu-zen avatar Jan 24 '23 21:01 lu-zen

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)

lu-zen avatar Mar 13 '23 22:03 lu-zen