Go to file
Vikram Rangnekar ccab367351 fix: make array variables work again 2020-05-24 17:43:54 -04:00
.chglog chore: update changelog 2020-05-03 21:01:16 -04:00
.github/ISSUE_TEMPLATE Update issue templates 2019-12-01 01:25:39 -05:00
config fix: add http tracing so end-to-end tracing is possible 2020-05-24 02:24:24 -04:00
core fix: make array variables work again 2020-05-24 17:43:54 -04:00
docs fix: make array variables work again 2020-05-24 17:43:54 -04:00
examples/rails-app fix: vars not sanitized in roles_query 2020-04-18 17:46:40 -04:00
internal docs: add telemetry docs 2020-05-24 10:44:00 -04:00
jsn feat: remove data from variables saved to allow.list 2020-05-07 10:27:40 -04:00
.deepsource.toml Add .deepsource.toml 2020-05-03 19:57:42 +00:00
.dockerignore Improve the demo experience 2019-04-11 01:10:51 -04:00
.gitignore fix: make array variables work again 2020-05-24 17:43:54 -04:00
.wtc.yaml Make go get to install work. 2020-04-16 00:26:32 -04:00
CHANGELOG.md chore: update changelog 2020-05-03 21:01:16 -04:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2019-12-01 00:13:04 -05:00
CONTRIBUTING.md Update CONTRIBUTING.md 2019-12-01 01:17:27 -05:00
Dockerfile Make go get to install work. 2020-04-16 00:26:32 -04:00
LICENSE Move license from MIT to Apache 2.0. Add Makefile 2019-11-28 01:25:46 -05:00
Makefile fix: bug with reading config file by name 2020-05-10 11:26:48 -04:00
NOTICE Move license from MIT to Apache 2.0. Add Makefile 2019-11-28 01:25:46 -05:00
README.md docs: add opencensus support to the README 2020-05-23 11:50:38 -04:00
demo rails-app moved to examples folder 2019-10-05 00:49:39 -04:00
docker-compose.yml Fix issue with upgrading to postgres 12 docker image #36 2020-02-24 02:37:21 +05:30
fuzzbuzz.yaml Add migrate command 2019-09-26 00:35:31 -04:00
go.mod feat: add opencensus tracing and metrics support 2020-05-23 11:43:57 -04:00
go.sum feat: add opencensus tracing and metrics support 2020-05-23 11:43:57 -04:00
main.go Make go get to install work. 2020-04-16 00:26:32 -04:00

README.md

Super Graph - Fetch data without code!

GoDoc Apache 2.0 Docker build Discord Chat

Super Graph 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.

Using it as a service

go get github.com/dosco/super-graph
super-graph new <app_name>

Using it in your own code

go get github.com/dosco/super-graph/core
package main

import (
  "database/sql"
  "fmt"
  "time"
  "github.com/dosco/super-graph/core"
  _ "github.com/jackc/pgx/v4/stdlib"
)

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

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

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

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

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

About Super Graph

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 Super Graph, 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.

Features

  • Complex nested queries and mutations
  • 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, 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
  • Works with Postgres and YugabyteDB
  • OpenCensus Support: Zipkin, Prometheus, X-Ray, Stackdriver

Documentation

supergraph.dev

Reach out

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

twitter/dosco

chat/super-graph

License

Apache Public License 2.0

Copyright (c) 2019-present Vikram Rangnekar