Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
/ superbackend Public archive

Create your database and service layer from GraphQL types

License

Notifications You must be signed in to change notification settings

Eunovo/superbackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperBackend

Create your database and service layer from GraphQL types!
This project is still in alpha.

Install

On npm npm install -s @eunovo/superbackend

On yarn yarn add @eunovo/superbackend

Quick Start

Define your entities in a graphql file

"""
@model
"""
type User {
 username: String
 password: String
}

Instantiate your backend services and repositories

import {
    AuthorizationPlugin,
    buildMongoRepo,
    SuperBackend,
    RelationshipPlugin,
    UsernamePasswordAuthPlugin
} from '@eunovo/superbackend';

const schemaPath = `<YOUR_GRAPHQL_FILE>`;
const backend = new SuperBackend(buildMongoRepo);

backend.plugin(new RelationshipPlugin());
backend.plugin(new UsernamePasswordAuthPlugin());
backend.plugin(new AuthorizationPlugin());

const { models, repos, services } = backend.build(schemaPath);

License

Licensed under the MIT license

About

Create your database and service layer from GraphQL types

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published