All Projects → woss → graphql-to-sql

woss / graphql-to-sql

Licence: other
GraphQL model to SQL

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to graphql-to-sql

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 (+191015.38%)
Mutual labels:  postgres, hasura
boilerplate
Fullstack boilerplate using Typescript, React, Node & GraphQL
Stars: ✭ 738 (+5576.92%)
Mutual labels:  postgres, prisma
Zws
Shorten URLs using invisible spaces.
Stars: ✭ 780 (+5900%)
Mutual labels:  postgres, prisma
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+139653.85%)
Mutual labels:  postgres, prisma
hasura-node-monolith-example
Example of a monolithic web application using Hasura GraphQL Engine + Node.js + Next.js
Stars: ✭ 25 (+92.31%)
Mutual labels:  hasura, hasura-graphql
quasar-starter-ssr-pwa-jest-cypress
Accelerated starter kit for building a quasar 17 app.
Stars: ✭ 49 (+276.92%)
Mutual labels:  prisma
stack
🥭 nxpm-stack lets you generate a complete and opinionated full-stack application in a Nx Workspace, ready to extend and deploy!
Stars: ✭ 98 (+653.85%)
Mutual labels:  prisma
Venflow
A brand new, fast and lightweight ORM, build for PostgreSQL.
Stars: ✭ 162 (+1146.15%)
Mutual labels:  postgres
google-bigtable-postgres-fdw
Google Bigtable Postgres FDW in Rust
Stars: ✭ 37 (+184.62%)
Mutual labels:  postgres
prisma-client-py
Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
Stars: ✭ 739 (+5584.62%)
Mutual labels:  prisma
ChefAPI
API using FastAPI and PostgreSQL for sharing or keeping track of awesome food recipes Based on Oauth2 and JWT 💎
Stars: ✭ 16 (+23.08%)
Mutual labels:  postgres
cloud-tileserver
Serve mapbox vectortiles via AWS stack
Stars: ✭ 48 (+269.23%)
Mutual labels:  postgres
clock-in-out
A clock-in/out system using nestJS, PostgreSQL, TypeORM, Angular, Arduino, RxJS
Stars: ✭ 61 (+369.23%)
Mutual labels:  postgres
webstone
Start your next full-stack application with Webstone and configure it as you go.
Stars: ✭ 71 (+446.15%)
Mutual labels:  prisma
elephantry
PostgreSQL OMM for rust
Stars: ✭ 28 (+115.38%)
Mutual labels:  postgres
graphql-playground
🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
Stars: ✭ 8,103 (+62230.77%)
Mutual labels:  prisma
ds-visualizer
This is an ongoing project based on data structures. We will be presenting and explaining the code of each basic data structure with the help of a visualizer.
Stars: ✭ 14 (+7.69%)
Mutual labels:  prisma
lego
A lightweight SQL (string) builder using ES6 template strings. Lego embraces SQL instead of adding yet another abstraction layer.
Stars: ✭ 54 (+315.38%)
Mutual labels:  postgres
mitoc-trips
The MIT Outing Club's trip management system
Stars: ✭ 30 (+130.77%)
Mutual labels:  postgres
postgres-deno
A PostgreSQL extension for Deno: run Typescript in PostgreSQL functions and triggers.
Stars: ✭ 87 (+569.23%)
Mutual labels:  postgres

graphql to sql

** NOTICE **

This pacakge is NOT MAINTAINED ANYMORE.

Turn your Prisma GraphQL models into SQL tables without Prisma server.

Hook up adapter and do more magic.

Currently only Hasura is supported, more will come if needed.

Documentation

To generate local documentation run yarn docs in root of this module.

Online docs are located here

Debug && Development

For convenience .vscode folder is provided for easier debugging and development.

This will run the ./src/run.ts which is the way how I test the module. THis should not be imported or used directly, it is a dev/test file.

yarn
yarn start

Open VSCode and hit F5 to attach to the current running process. Enjoy debugging. :)

Logging

Debug npm package is used to do the logging.

Each of the Adapters and Parsers has it's own logger for convenience in debugging. To activate ALL logger set the environmental variable to DEBUG=GQL2SQL* and be amazed amount of logs you get :)

You can specify to log only parsers like DEBUG=GQL2SQL:parser* or just prisma parser like DEBUG=GQL2SQL:parser:prisma

Adapters are similar, instead of parser use adapter like this DEBUG=GQL2SQL:adapter*

Some Adapters like hasura have multiple loggers defined, adapter related and api related. If you wish to see them all, do following DEBUG=GQL2SQL:adapter:hasura* or just api DEBUG=GQL2SQL:adapter:hasura:api

Tasks

  • DateTime must be correctly handled. especially createdAt and updatedAt
  • ID! default CID, currently autoincrement

Notes

  • Prisma uses CID for ID! type, implementation here is to use autoincrement INTEGER.
  • UUID is defaulted to UUIDV4 and excepcts that DB supports uuid_generate_v4()

On Prisma definition models

relatedField is populated when relation is set on both types:

Example:

type A {
  id: ID!
  b: A @relation(name: "ABConnected")
}
type B {
  id: ID!
  a: A @relation(name: "ABConnected")
}

relationName is a name of the @relation directive, in above case is ABConnected

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