All Projects → bradleyboy → Tuql

bradleyboy / Tuql

Licence: mit
Automatically create a GraphQL server from a SQLite database or a SQL file

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tuql

Postgraphile
GraphQL is a new way of communicating with your server. It eliminates the problems of over- and under-fetching, incorporates strong data types, has built-in introspection, documentation and deprecation capabilities, and is implemented in many programming languages. This all leads to gloriously low-latency user experiences, better developer experiences, and much increased productivity. Because of all this, GraphQL is typically used as a replacement for (or companion to) RESTful API services.
Stars: ✭ 10,967 (+1984.98%)
Mutual labels:  graphql, automatic-api, schema
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 (-27%)
Mutual labels:  graphql, sqlite, sqlite3
Squeal
A Swift wrapper for SQLite databases
Stars: ✭ 303 (-42.4%)
Mutual labels:  sqlite, sqlite3, sqlite-database
nim-gatabase
Connection-Pooling Compile-Time ORM for Nim
Stars: ✭ 103 (-80.42%)
Mutual labels:  sqlite, sqlite-database, sqlite3
Wxsqlite3
wxSQLite3 - SQLite3 database wrapper for wxWidgets (including SQLite3 encryption extension)
Stars: ✭ 373 (-29.09%)
Mutual labels:  sqlite, sqlite3, sqlite-database
mdb2sqlite
Conversion tool used to convert microsoft access database to sqlite.
Stars: ✭ 79 (-84.98%)
Mutual labels:  sqlite, sqlite-database, sqlite3
Babel Plugin Import Graphql
Enables import syntax for .graphql and .gql files
Stars: ✭ 284 (-46.01%)
Mutual labels:  graphql, schema
Go Sqlite Lite
SQLite driver for the Go programming language
Stars: ✭ 315 (-40.11%)
Mutual labels:  sqlite, sqlite3
Nestjs Query
Easy CRUD for GraphQL.
Stars: ✭ 325 (-38.21%)
Mutual labels:  graphql, sequelize
dotfiles
Configs for apps I care about
Stars: ✭ 19 (-96.39%)
Mutual labels:  sqlite, sqlite3
Sqlite Utils
Python CLI utility and library for manipulating SQLite databases
Stars: ✭ 368 (-30.04%)
Mutual labels:  sqlite, sqlite-database
Aiosqlite
asyncio bridge to the standard sqlite3 module
Stars: ✭ 411 (-21.86%)
Mutual labels:  sqlite, sqlite3
Entityframework.exceptions
Handle database errors easily when working with Entity Framework Core. Supports SQLServer, PostgreSQL, SQLite, Oracle and MySql
Stars: ✭ 266 (-49.43%)
Mutual labels:  sqlite, sqlite3
Graphback
Graphback - Out of the box GraphQL server and client
Stars: ✭ 323 (-38.59%)
Mutual labels:  graphql, schema
Graphql For Vscode
GraphQL syntax highlighting, linting, auto-complete, and more!
Stars: ✭ 265 (-49.62%)
Mutual labels:  graphql, schema
Androidwithkotlin
🚀 These are android sample projects which are written in Kotlin. It covers video streaming, mp3 player, sqlite, location services, custom camera, o-notifications, simple compass etc.
Stars: ✭ 447 (-15.02%)
Mutual labels:  sqlite, sqlite-database
Neo4j Graphql
GraphQL bindings for Neo4j, generates and runs Cypher
Stars: ✭ 429 (-18.44%)
Mutual labels:  graphql, automatic-api
Graphql Engine
Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
Stars: ✭ 24,845 (+4623.38%)
Mutual labels:  graphql, automatic-api
Chatty
A WhatsApp clone with React Native and Apollo (Tutorial)
Stars: ✭ 481 (-8.56%)
Mutual labels:  graphql, sequelize
VVSequelize
数据库模型映射,自动建表, 自动更新表,数据增删改查, FTS全文搜索, 支持自定义fts3,4,5分词器,可拼音分词. sql,fmdb,wcdb,sqlite3,orm,fts,fts3,fts4,fts5
Stars: ✭ 16 (-96.96%)
Mutual labels:  sqlite, sqlite3

tuql build status Coverage Status

Pronounced: Too cool

tuql is a simple tool that turns a sanely formatted sqlite database into a graphql endpoint. It tries to infer relationships between objects, currently supporting belongsTo, hasMany and belongsToMany. It also forms the basic mutations necessary to create, update, and delete objects, as well as assoicate many-to-many relationships.

Installing

npm install -g tuql

Using

tuql --db path/to/database.sqlite

You can also optionally set the port and enable graphiql:

tuql --db path/to/database.sqlite --port 8888 --graphiql

Or, you can use a sql file with statements to build up an in-memory database:

tuql --infile path/to/db_dump.sql --graphiql

If you'd like to print out the schema itself, use:

tuql --db path/to/database.sqlite --schema

Or send it to a file:

tuql --db path/to/database.sqlite --schema > schema.graphql

How it works

Imagine your sqlite schema looked something like this:

posts users categories category_post
id   id id category_id
user_id username title post_id
title
body

tuql will automatically define models and associations, so that graphql queries like this will work right out of the box:

{
  posts {
    title
    body
    user {
      username
    }
    categories {
      title
    }
  }
}

tuql works one of two ways. It prefers to map your schema based on the foreign key information in your tables. If foreign keys are not present, tuql assumes the following about your schema in order to map relationships:

  1. The primary key column is named id or thing_id or thingId, where thing is the singular form of the table name. Example: For a table named posts, the primary key column should be named id, post_id or postId.
  2. Similarly, foreign key columns should be thing_id or thingId, where thing is the singular form of the associated table.
  3. For many-to-many associations, the table name should be in the form of foo_bar or bar_foo (ordering is not important). The columns should follow the same pattern as #2 above.
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].