4 ms·
Hey @cjonas, I'm a developer on Supabase Edge Functions team. We do have plans to improve the current database trigger behavior. Will share more updates on this
by laktek 3y ago
Hey @cjonas, I'm a developer on Supabase Edge Functions team. We do have plans to improve the current database trigger behavior. Will share more updates on this in the coming months.
Can you explain what do you mean by template URLs? Do you mean route params like `/v1/functions/users/:id`? If so, you can use a framework like Oak[1] to handle them. Edge Functions will make the full path including querystring available to the router.
Also, you can use URLPattern API to match paths. Here's an example of RESTful API built using that: https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/restful-tasks/index.ts#L88-L89 https://github.com/supabase/supabase/blob/master/examples/ed...
Source maps, is it broken during local dev or when you deploy the function? Also, by broken you mean in a stack trace the file / line numbers aren't accurate?
[1] https://github.com/oakserver/oak https://github.com/oakserver/oak
- cjonas 3y ago> We do have plans to improve the current database trigger behavior. Will share more updates on this in the coming months. Excited to hear more! Being able to trigger functions from DB & cron triggers without having to hardcode a secret (which causes them to end up in migrations files) will be a huge improvement. > Can you explain what do you mean by template URLs? Oh, I had no idea that the functions routes were "wild card"! I don't think that's mentioned anywhere in the documentation, btw. > Source maps, is it broken during local dev or when you deploy the function? Sorry, I actually mean "import-maps": https://github.com/supabase/cli/issues/1338 https://github.com/supabase/cli/issues/1338 "Source maps" (does deno actually use source maps?) ARE broken as well. EG: The line numbers in runtime don't line up with the function code in the IDE or even that is in the docker volume.
- laktek 3y ago> Oh, I had no idea that the functions routes were "wild card"! I don't think that's mentioned anywhere in the documentation, btw. Good point! will update the docs. > Sorry, I actually mean "import-maps": https://github.com/supabase/cli/issues/1338 https://github.com/supabase/cli/issues/1338 I'll take a look at this issue. We've improved import map resolution in the last couple of CLI releases. But it looks like there are more edge cases.