From the course: Supabase Essential Training

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Querying with the JavaScript client

Querying with the JavaScript client

From the course: Supabase Essential Training

Querying with the JavaScript client

- [Instructor] As tables and views are added in Supabase, an API is being generated for access. Let's have a look at how this API can be accessed and used in an application. Here in the documentation section of the Supabase dashboard, we're looking at the items table. Notice here under JavaScript, we have several things that look sort of like SQL, but they're not exactly. For instance, if we want to insert rows into the items table, we can use the from function here to do that. Underneath it is a rest endpoint. Notice that there is no SQL happening here at all. The JavaScript client makes it feel like SQL, but it's actually a little different. Now let's open up our text editor, so we can write some code that uses this JavaScript. We are using this line to load the Supabase JavaScript client from a CDN. This way we don't have to download it, and we don't have to manage the version. On this second line, we are initializing…

Contents