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
Describe the bug The generated typescript types are incorrect when using nested embedding in a query. Gives the error:
`Property 'protertyName' does not exist on type 'SelectQueryError<"Referencing missing column 'propertyName'">[].`
To Reproduce Steps to reproduce the behavior:
create table public.recipes ( id bigint primary key generated always as identity, title text not null ); create table public.ingredients ( id bigint primary key generated always as identity, title text not null ); create table public.recipe_ingredients ( recipe bigint not null references recipes on update cascade on delete cascade, ingredient bigint not null references ingredients on update cascade, constraint recipe_ingredients_pkey primary key (one, two) );
npx supabase gen types typescript --local > /some/path/types.ts
const recipe = await supabase .from("recipes") .select("title, recipe_ingredients(ingredient(title))") .eq("id", id) .maybeSingle();
recipe.data.recipe_ingredients.map((recipe_ingredient) => recipe_ingredient.ingredient.title);
Expected behavior I expected the type to be string.
string
Screenshots
System information Rerun the failing command with --create-ticket flag.
--create-ticket
supabase services
SERVICE IMAGE │ LOCAL │ LINKED ─────────────────────────┼──────────────────────┼──────────── supabase/postgres │ 15.1.1.41 │ 15.1.1.41 supabase/gotrue │ v2.148.0 │ v2.148.0 postgrest/postgrest │ v12.0.2 │ v12.0.2 supabase/realtime │ v2.28.32 │ - supabase/storage-api │ v1.0.10 │ v1.0.10 supabase/edge-runtime │ v1.45.2 │ - supabase/studio │ 20240422-5cf8f30 │ - supabase/postgres-meta │ v0.80.0 │ - supabase/logflare │ 1.4.0 │ - bitnami/pgbouncer │ 1.20.1-debian-11-r39 │ - darthsim/imgproxy │ v3.8.0 │ -
Additional context If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The generated typescript types are incorrect when using nested embedding in a query. Gives the error:
`Property 'protertyName' does not exist on type 'SelectQueryError<"Referencing missing column 'propertyName'">[].`
To Reproduce
Steps to reproduce the behavior:
npx supabase gen types typescript --local > /some/path/types.ts
Expected behavior
I expected the type to be
string
.Screenshots
System information
Rerun the failing command with
--create-ticket
flag.supabase services
command]Additional context
If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered: