Rocketgraph gives superpowers to your web applications. Get Authentication, realtime GraphQL, Serverless functions and a Postgres DB right from day 0. When you create a project on rocketgraph you are provided with Postgres Instance, Hasura console to get a GraphQL API and manage granular authorisation rules, Automated backend deployments with Git, and a full blown authentication system built in. It uses the open-source Hasura Batteries to power it's authentication service.
- ๐ Authentication using email/password
- ๐ฌ Authentication using social logins
- ๐ช Authentication using OTP and magic link
- โ๏ธ Server-less functions: Bring your own code and run it as thin AWS lambdas.
- ๐จโ๐ป Your code will be automatically picked up from your Github commits by our Github bot and deployed as Lambdas
- ๐ฆพ AWS RDS support: 8GB PostgreSQL
- ๐ฉโ๐ Postgres Logs using
pgAudit
- ๐ช Secure session management with cookies refreshed automatically
This guide helps you get started with rocketgraph and setting up your backend in just 15 minutes. In 15 minutes you will be able to create a todos app with db, auth and realtime subscriptions.
Your first instance is free for 14 days. No credit card. So go to the signup page and create account. Then on the dashboard click new project. Wait for a few seconds for the instance to boot up and load the software.
You can see your hasura console url. There you can manage your database.
And links to your Backend URLs
For your front-end, you can start with the already provided examples. Just download and npm run dev
. todos
is without authentication, auth
is with authentication.
npx create-react-app todos
cd todos
yarn add react-router-dom react-router
yarn add @apollo/client @rocketgraphql/react-apollo @rocketgraphql/rocketgraph-js-sdk graphql
Next create src/utils/config.js
and add the following:
import { createClient } from "@rocketgraphql/rocketgraph-js-sdk";
const config = {
baseURL: "https://backend-XXXXXXX.rocketgraph.app/auth",
};
const { auth } = createClient(config);
export { auth };
Replace the backend-XXX
URL with the url on your Rocketgraph dashboard. Congratulations, you have setup the basics required to use Rocketgraph.
Use GraphQL in your application, index.js
by wrapping your App in RApolloProvider as follows:
// src/index.js
import React from "react";
import ReactDOM from "react-dom";
import { ChakraProvider } from '@chakra-ui/react'
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import App from "./App";
import Message from "./components/Message"
import Login from "./components/Login"
import Signup from "./components/Signup"
// Rocketgraph providers
import { RApolloProvider } from "@rocketgraphql/react-apollo";
import { auth } from "./utils/config";
ReactDOM.render(
<React.StrictMode>
<ChakraProvider>
<RApolloProvider auth={auth} gqlEndpoint="https://hasura-AEF0WTE.rocketgraph.app/v1/graphql">
<Router>
<Routes>
<Route path="/login" element={<Login />}/>
<Route path="/signup" element={<Signup />}/>
<Route path="/messages" element={<Message />} />
<Route path="/" element={<App />} />
</Routes>
</Router>
</RApolloProvider>
</ChakraProvider>
</React.StrictMode>,
document.getElementById("root")
);
Then in your App.js file
import { gql, useSubscription } from "@apollo/client";
const GET_TODOS = gql`
subscription {
users {
id
email
}
}
`;
export default function Application() {
const [ data, loading] = useSubscription(GET_TODOS);
}
In your logs dasboard you can write complex queries to query your logs. Use cloudwatch logs syntax
See : https://github.com/RocketsGraphQL/hasura-batteries
To run this as a standalone docker container.
- We use cypress tests on all the examples provided. Run them using
cypress
- We use unit tests and CI pipelines, see: https://github.com/RocketsGraphQL/hasura-batteries