BlueBase
  • 💧Introduction
  • Tutorial
    • 1. Getting Started
      • 1.1 Setup
      • 1.2 Add Plugins
      • 1.3 Create Custom Plugin
    • 2. Backend API
      • 2.1 Create Backend API
      • 2.2 Setup Apollo Client
      • 2.3 Generate Typescript Interfaces
    • 3. Create Screens
      • 3.1 Pending Tasks Screen
      • 3.2 Edit Task Screen
      • 3.3 Task Create Screen
      • 3.4 Tab Navigation
    • 4. CRUD Operations
      • 4.1 Creating Tasks
      • 4.2 Reading Tasks
      • 4.3 Updating Tasks
      • 4.4 Deleting Tasks
    • 5. Enhancements
      • 5.1 Internationalisation
      • 5.2 Theming
      • 5.3 Dynamic Images
      • 5.4 Settings & Configurations
      • User Management
  • Key Concepts
    • 🎡Lifecycle Events
    • â›Šī¸Main App Layout
    • 🔌Plugins
      • Plugin API
      • Register a Plugin
      • Making a Plugin Configurable
      • Developing an Analytics Plugin
      • Developing a Logger Plugin
      • Developing a Theme Plugin
    • 🚇Filters
    • 🎁Components
      • Components API
      • Registering a Component
      • Accessing Components
      • Higher Order Components
    • 🎨Themes
      • Consuming Selected Theme
      • Customise Themes
      • Customise Components
      • Theme Configs
      • Theme Structure
    • đŸŽ›ī¸Configs
  • API
    • 📈Analytics
    • 📔Logger
    • đŸ“ĻBlueBase Modules
    • Registry
  • Guides
    • âœ‚ī¸Code Splitting
    • đŸ‘ŊMigrating to V8
  • Components
    • ActivityIndicator
    • BlueBase
      • BlueBaseApp 📌
      • BlueBaseConsumer 📌
      • BlueBaseFilter 📌
      • ThemeConsumer 📌
    • Button
    • ComponentState 📌
    • EmptyState 📌
    • ErrorState 📌
    • Icons
      • Icon
      • DynamicIcon 📌
      • PluginIcon 📌
    • JsonSchema 📌
    • LoadingState 📌
    • Noop 📌
    • Observers
      • DataObserver 📌
      • ErrorObserver 📌
      • HoverObserver 📌
      • WaitObserver 📌
    • StatefulComponent 📌
    • Typography
    • View
Powered by GitBook
On this page
  • Step 1: Sign up
  • Step 2: Create a New Project
  • 3. Create Database Table
  • 4. Build GraphQL Schema
  • 5. API Details

Was this helpful?

Export as PDF
  1. Tutorial
  2. 2. Backend API

2.1 Create Backend API

Previous2. Backend APINext2.2 Setup Apollo Client

Last updated 3 years ago

Was this helpful?

Before we start creating our app, we first need to create an API connected to a database. For this purpose, we will use a free tool called .

Step 1: Sign up

Go to and Sign up to create a new account.

Step 2: Create a New Project

Next, we need to create a new project. Click the "New Project" button once you login into the Supabase app, and follow the wizard to create your API project.

3. Create Database Table

Now we need to create our database table to store our to-do tasks.

Start by clicking the Table Editor button on the left sidebar menu. Once you're on this page, press the "Create a new table" button.

When the form opens, add the following columns to match the screenshot below:

  1. id (uuid)

  2. title (varchar)

  3. description (text)

  4. completed (bool)

  5. created_at (timestamptz)

Make sure "Enable Row Level Security" is NOT checked.

4. Build GraphQL Schema

On the left sidebar menu click the "SQL Editor" button. Once on this screen, press the "+ New Query" button.

Now enter the following code snippet in the editor and press "RUN"

-- Rebuild the GraphQL Schema Cache
select graphql.rebuild_schema();

5. API Details

Go to Settings => API page. Here you can find the API URL and Key as shown in the screenshot below.

That's all. We're done with creating our API for the project. All we need to do is consume it now.

Since we are going to be building our app on top of query language, we need to tell Supabase to build its schema.

GraphQL
Supabase
supabase.com
2a. Click "New Project"
2b. Enter Organization Name
2c. Enter project details
2d. Project dashboard
Press the "Create a new table" button
Add table columns