GithubHelp home page GithubHelp logo

willnode / gqldbms Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 149 KB

GraphQL drop-in Database Management Server in Rust

License: GNU General Public License v3.0

HTML 24.45% Rust 75.55%
graphql rust dbms

gqldbms's Introduction

GraphQL-Powered Database Management Server

A simple drop-in web server written in Rust for database powered with GraphQL.

No need to write resolvers, No need to depends on separate SQL servers.

How it Works

  1. This server uses JSON to save data
  2. GraphQL objects are stored as JSON objects wrapped in array
  3. Listening to schema that defined by yours

Running

  1. Clone
  2. cargo run
  3. Go to localhost:3000/graphiql
  4. Test it:
query AuthorWithPosts {
  author(id: 1) {
    username
    posts {
      id
      title
    }
  }
  feed {
    id
    title
    author {
      username
    }
  }
}

returns:

{
  "data": {
    "author": [
      {
        "posts": [
          {
            "id": 1,
            "title": "Skywalker off the Road"
          },
          {
            "id": 2,
            "title": "Truth of Science"
          }
        ],
        "username": "John"
      }
    ],
    "feed": [
      {
        "author": {
          "username": "John"
        },
        "id": 1,
        "title": "Skywalker off the Road"
      },
      {
        "author": {
          "username": "John"
        },
        "id": 2,
        "title": "Truth of Science"
      },
      {
        "author": {
          "username": "Alex"
        },
        "id": 3,
        "title": "Celebrating Alex"
      }
    ]
  }
}

gqldbms's People

Contributors

willnode avatar

Watchers

 avatar  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.