Giter Site home page Giter Site logo

lapnd / graphql-backend-template-dgraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graphql-editor/graphql-backend-template-dgraph

0.0 0.0 0.0 1.32 MB

Dgraph GraphQL Editor template for backend using very fast dgraph golang database server under the hood

graphql-backend-template-dgraph's Introduction

GraphQL Editor Team - Dgraph Backend template

This template is worth 2020 โœจ.

Brought by GraphQL Editor Team

Why?

You get database with graphql interface for storing your data just from GraphQL Schema.

How it works

Like that, and it is only from GraphQL Schema!! :

Dependencies

Docker

jq

These 2 are needed to run this

npm

Quick Start

Clone this repo

git clone https://github.com/graphql-editor/graphql-backend-template-dgraph
npm install

To start with this template you will need GraphQL Schema. Create one with GraphQL Editor and copy its contents to schema.graphql file. Example schema can look like this Schema Remember when using Dgraph you need only Types, Interfaces and Enums. Also there is a small bug in Dgraph which doesnt allow comments in schema files.

Or if you are lazy:

Forget about the schema and use one inside repo. Do nothing and proceed.

Run this command in one terminal

npm run dgraph

And run this command in the other one

npm run inject-dgraph-schema

Voila. Your GraphQL native database is ready to use. Run queries in a tool like Firecamp, so Insomnia, GraphiQL etc.

Generate Client libraries

When the server is running you can generate the actual dgraph generated schema file and autcomplete library for Javascript or TypeScript Frontend

Browser / React Native

TypeScript

npm run generate-nodets

Javascript

npm run generate-nodejs

Node

TypeScript

npm run generate-ts

Javascript

npm run generate-js

Author

Twitter - follow me for latest news with this boilerplate

Github - follow me for latest news with this boilerplate

Under the hood

Dgraph

Zeus

Additional resuources

Dgraph Definitions Dgraph tutorial

graphql-backend-template-dgraph's People

Contributors

aexol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.