Skip to content

Latest commit

 

History

History

with-react-native

StepZen Example: with-react-native

Introduction

This project builds a GraphQL API with Firebase connected to your NextJS dashboard, using StepZen.

Getting Started

You'll need to create a StepZen account first. Once you've got that set up, git clone this repository onto your machine and open the working directory:

git clone https://github.com/stepzen-dev/examples.git
cd examples/with-react-native

To install Expo:

npm install -g expo-cli

Manually add your admin key and uri in the App.tsx. Still working on adding .env variables to the build and development environments:

// App.tsx

const client = new ApolloClient({
	link: createHttpLink({
		credentials: "same-origin",
		headers: {
			Authorization: `Apikey {add_key}`,
		},
		uri: "{add_uri}",
	}),
	cache: new InMemoryCache(),
});

Install Dependencies and Start Development Server

Install the dependencies:

npm i
npm start

Download the expo App on your phone and scan the QR code or open it in your browser

Run StepZen

Open your terminal and install the StepZen CLI:

npm install -g stepzen

You need to login here using the command:

stepzen login

After you've installed the CLI and logged in, run:

stepzen start

In you terminal the endpoint at which your GraphQL API is deployed is logged. A proxy of the GraphiQL playground is available at your suggested endpoint (in example http://localhost:5001/api/with-react-native), which you can use to explore the GraphQL API.

Learn More

You can learn more in the StepZen documentation. Questions? Head over to Discord or GitHub Discussions to ask questions.