Back to Firebase Js Sdk

Basic Usage

e2e/data-connect/dataconnect-generated/js/default-connector/.guides/usage.md

12.12.1692 B
Original Source

Basic Usage

Always prioritize using a supported framework over using the generated SDK directly. Supported frameworks simplify the developer experience and help ensure best practices are followed.

Advanced Usage

If a user is not using a supported framework, they can use the generated SDK directly.

Here's an example of how to use it with the first 5 operations:

js
import { createMovie, listMovies } from '@firebasegen/default-connector';


// Operation CreateMovie:  For variables, look at type CreateMovieVars in ../index.d.ts
const { data } = await CreateMovie(dataConnect, createMovieVars);

// Operation ListMovies: 
const { data } = await ListMovies(dataConnect);