All Projects → dosco → Graphjin

dosco / Graphjin

Licence: apache-2.0
GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Graphjin

Niklick
Rails Versioned API solution template for hipsters! (Ruby, Ruby on Rails, REST API, GraphQL, Docker, RSpec, Devise, Postgress DB)
Stars: ✭ 39 (-96.91%)
Mutual labels:  graphql, database, postgresql, rails, ruby-on-rails
Qb
The database toolkit for go
Stars: ✭ 524 (-58.54%)
Mutual labels:  sql, database, mysql, postgresql
V8 Archive
Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
Stars: ✭ 486 (-61.55%)
Mutual labels:  graphql, sql, database, mysql
Beekeeper Studio
Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows.
Stars: ✭ 8,053 (+537.1%)
Mutual labels:  sql, database, mysql, postgresql
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+271.44%)
Mutual labels:  sql, database, mysql, postgresql
Openrecord
Make ORMs great again!
Stars: ✭ 474 (-62.5%)
Mutual labels:  graphql, sql, mysql, postgresql
Eliasdb
EliasDB a graph-based database.
Stars: ✭ 611 (-51.66%)
Mutual labels:  graphql, graphql-server, graph, database
Jet
Type safe SQL builder with code generation and automatic query result data mapping
Stars: ✭ 373 (-70.49%)
Mutual labels:  sql, database, mysql, postgresql
Tidb
TiDB is an open source distributed HTAP database compatible with the MySQL protocol
Stars: ✭ 29,871 (+2263.21%)
Mutual labels:  cloud-native, sql, database, mysql
Db Dumper
Dump the contents of a database
Stars: ✭ 744 (-41.14%)
Mutual labels:  sql, database, mysql, postgresql
Eralchemy
Entity Relation Diagrams generation tool
Stars: ✭ 767 (-39.32%)
Mutual labels:  sql, database, mysql, postgresql
Franchise
🍟 a notebook sql client. what you get when have a lot of sequels.
Stars: ✭ 3,823 (+202.45%)
Mutual labels:  sql, database, mysql, postgresql
Walkable
A Clojure(script) SQL library for building APIs: Datomic® (GraphQL-ish) pull syntax, data driven configuration, dynamic filtering with relations in mind
Stars: ✭ 384 (-69.62%)
Mutual labels:  graphql, sql, mysql, postgresql
Evolve
Database migration tool for .NET and .NET Core projects. Inspired by Flyway.
Stars: ✭ 477 (-62.26%)
Mutual labels:  sql, database, mysql, postgresql
Dbeaver
Free universal database tool and SQL client
Stars: ✭ 23,752 (+1779.11%)
Mutual labels:  sql, database, mysql, postgresql
Go Sqlbuilder
A flexible and powerful SQL string builder library plus a zero-config ORM.
Stars: ✭ 539 (-57.36%)
Mutual labels:  sql, database, mysql, postgresql
Graphqlize
A Clojure & JVM library for developing GraphQL API instantly from Postgres and MySQL databases
Stars: ✭ 240 (-81.01%)
Mutual labels:  graphql, graphql-server, mysql, postgresql
Rel
💎 Modern Database Access Layer for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
Stars: ✭ 317 (-74.92%)
Mutual labels:  sql, database, mysql, postgresql
Database rewinder
minimalist's tiny and ultra-fast database cleaner
Stars: ✭ 685 (-45.81%)
Mutual labels:  database, mysql, postgresql, rails
Fullstack Graphql
🌈 Simple Fullstack GraphQL Application. API built with Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux to access the API. Written in ES6 using Babel + Webpack.
Stars: ✭ 955 (-24.45%)
Mutual labels:  graphql, graphql-server, database, mysql

GraphJin - Build APIs in 5 minutes

GoDoc GoReport Apache 2.0 Docker build Discord Chat

GraphJin gives you a high performance GraphQL API without you having to write any code. GraphQL is automagically compiled into an efficient SQL query. Use it either as a library or a standalone service.

1. Quick Install

Mac (Homebrew)

brew install dosco/graphjin/graphjin

Ubuntu (Snap)

sudo snap install --classic graphjin

Debian and Redhat (releases)

Download the .deb or .rpm from the releases page and install with dpkg -i and rpm -i respectively.

Go Install

go get github.com/dosco/graphjin

2. Create New API

graphjin new <app_name>

cd <app_name>
docker-compose run api db:setup
docker-compose up

About GraphJin

After working on several products through my career I found that we spend way too much time on building API backends. Most APIs also need constant updating, and this costs time and money.

It's always the same thing, figure out what the UI needs then build an endpoint for it. Most API code involves struggling with an ORM to query a database and mangle the data into a shape that the UI expects to see.

I didn't want to write this code anymore, I wanted the computer to do it. Enter GraphQL, to me it sounded great, but it still required me to write all the same database query code.

Having worked with compilers before I saw this as a compiler problem. Why not build a compiler that converts GraphQL to highly efficient SQL.

This compiler is what sits at the heart of GraphJin, with layers of useful functionality around it like authentication, remote joins, rails integration, database migrations, and everything else needed for you to build production-ready apps with it.

Better APIs Faster!

Lets take for example a simple blog app. You'll probably need the following APIs user management, posts, comments, votes. Each of these areas need apis for listing, creating, updating, deleting. Off the top of my head thats like 12 APIs if not more. This is just for managing things for rendering the blog posts, home page, profile page you probably need many more view apis that fetch a whole bunch of things at the same time. This is a lot and we're still talking something simple like a basic blogging app. All these APIs have to be coded up by someone and then the code maintained, updated, made secure, fast, etc. We are talking weeks to months of work if not more. Also remember your mobile and web developers have to wait around till this is all done.

With GraphJin your web and mobile developers can start building instantly. All they have to do is just build the GraphQL queries they need and GraphJin fetches the data. Nothing to maintain no backend API code, its secure, lighting fast and has tons of useful features like subscriptions, rate limiting, etc built-in. With GraphJin your building APIs in minutes not days.

Features

  • Works with Postgres, MySQL8 and Yugabyte DB
  • Complex nested queries and mutations
  • Realtime updates with subscriptions
  • Build infinite scroll, feeds, nested comments, etc
  • Auto learns database tables and relationships
  • Role and Attribute-based access control
  • Opaque cursor-based efficient pagination
  • Full-text search and aggregations
  • JWT tokens supported (Auth0, JWKS, Firebase, etc)
  • Join database queries with remote REST APIs
  • Also works with existing Ruby-On-Rails apps
  • Rails authentication supported (Redis, Memcache, Cookie)
  • A simple config file
  • High performance Go codebase
  • Tiny docker image and low memory requirements
  • Fuzz tested for security
  • Database migrations tool
  • Database seeding tool
  • OpenCensus Support: Zipkin, Prometheus, X-Ray, Stackdriver
  • API Rate Limiting
  • Highly scalable and fast

graphjin-screenshot-final

Documentation

Quick Start

Documentation

Build APIs in 5 minutes with GraphJin

GraphQL vs REST

GraphQL Examples

Using it in your own code

go get github.com/dosco/graphjin/core
package main

import (
  "context"
  "database/sql"
  "fmt"
  "log"

  "github.com/dosco/graphjin/core"
  _ "github.com/jackc/pgx/v4/stdlib"
)

func main() {
  db, err := sql.Open("pgx", "postgres://postgres:@localhost:5432/example_db")
  if err != nil {
    log.Fatal(err)
  }

  sg, err := core.NewGraphJin(nil, db)
  if err != nil {
    log.Fatal(err)
  }

  query := `
    query {
      posts {
      id
      title
    }
  }`

  ctx := context.Background()
  ctx = context.WithValue(ctx, core.UserIDKey, 1)

  res, err := sg.GraphQL(ctx, query, nil)
  if err != nil {
    log.Fatal(err)
  }

  fmt.Println(string(res.Data))
}

Reach out

We're happy to help you leverage GraphJin reach out if you have questions

twitter/dosco

discord/graphjin (Chat)

Production use

The popular 42papers.com site for discovering trending papers in AI and Computer Science uses GraphJin for it's entire backend.

License

Apache Public License 2.0

Copyright (c) 2019-present Vikram Rangnekar

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].