We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema
module default { type User { ... multi movies: Movie; multi shows: Show; multi documentaries: Documentary; multi watching_list := ( select .movies union .shows order by .year ); multi all_media := ( select .movies union .shows union .documentaries ) } abstract type Content { required year: int16; required title: str; } type Movie extending Content { required plot: str; } type Show extending Content { required seasons: int16; } type Documentary { required title: str; required plot: str; } };
In the test below type of plot prop should be string | null.
plot
string | null
const q = e.select(e.User, () => ({ all_media: (all_media) => ({ title: true, ...e.is(e.Content, { year: true }), ...e.is(e.Show, { seasons: true, }), plot: e.op( all_media.is(e.Movie).plot, "??", all_media.is(e.Documentary).plot, ), }), })); type qT = $infer<typeof q>; tc.assert< tc.IsExact< qT, { all_media: ( | { title: string; plot: string; __typename: "default::Documentary"; } | { title: string; plot: string; year: number; __typename: "default::Movie"; } | { title: string; plot: string; year: number; seasons: number; __typename: "default::Show"; } )[]; }[] > >(true);
edgedb-js
@edgedb/generate
The text was updated successfully, but these errors were encountered:
diksipav
No branches or pull requests
Schema
In the test below type of
plot
prop should bestring | null
.edgedb-js
: [email protected]@edgedb/generate
): v0.5.6The text was updated successfully, but these errors were encountered: