0
0
Supabasecloud~10 mins

What is Supabase - Interactive Quiz & Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize a Supabase client with your URL and key.

Supabase
const supabase = createClient('[1]', 'your-public-anon-key');
Drag options to blanks, or click blank then click option'
Ahttps://xyzcompany.supabase.co
Bhttps://api.example.com
Clocalhost:5432
Dhttp://127.0.0.1
Attempts:
3 left
💡 Hint
Common Mistakes
Using localhost or local IP instead of the Supabase project URL
Using an incorrect or incomplete URL
2fill in blank
medium

Complete the code to fetch data from a Supabase table named 'users'.

Supabase
const { data, error } = await supabase.from('[1]').select('*');
Drag options to blanks, or click blank then click option'
Aprofiles
Baccounts
Cusers
Dmembers
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong table name that does not exist
Misspelling the table name
3fill in blank
hard

Fix the error in the code to insert a new user into the 'users' table.

Supabase
const { data, error } = await supabase.from('users').[1]({ name: 'Alice', age: 30 });
Drag options to blanks, or click blank then click option'
Ainsert
Bselect
Cupdate
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'update' instead of 'insert' for adding new data
Using 'select' which only reads data
4fill in blank
hard

Fill the blank to filter users older than 25 and order by name ascending.

Supabase
const { data, error } = await supabase.from('users').select('*').[1]('age', 25).order('name', { ascending: true });
Drag options to blanks, or click blank then click option'
Aneq
Bgt
Ceq
Dlt
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'lt' (less than) instead of 'gt' (greater than)
Using 'neq' (not equal) which does not filter properly
5fill in blank
hard

Fill both blanks to update the user's email where id equals 5.

Supabase
const { data, error } = await supabase.from('users').[1]({ email: 'new@example.com' }).[2]('id', 5);
Drag options to blanks, or click blank then click option'
Aupdate
Beq
Cfilter
Dselect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'select' instead of 'update' to change data
Using 'neq' instead of 'eq' for filtering