💙 Supporting healthcare non-profits: Metadataloop is free for 6–12 months. Contact Us to get started.
Free Online Tool

SQL / CSV to GraphQL Schema Generator

Paste SQL, CSV, or JSON — get GraphQL type definitions instantly.

Open the SQL → GraphQL Generator →

Overview

Scaffolding a GraphQL API from an existing relational schema usually means writing every type by hand. MetaDataLoop's generator parses your CREATE TABLE statements — or a CSV/JSON sample if you don't have DDL yet — and emits clean GraphQL SDL type definitions ready to drop into a schema file.

What you get

✓ INCLUDED
Supports both SQL CREATE TABLE and CSV/JSON sample input
✓ INCLUDED
Primary keys and UUID columns map to GraphQL ID
✓ INCLUDED
Integers map to Int, decimals to Float, booleans to Boolean
✓ INCLUDED
Non-nullable columns get the GraphQL ! required marker
✓ INCLUDED
Automatic camelCase conversion for field names

Type detection reference

Sample values and the dialect-native type they map to.

Sample valueInferred type
PRIMARY KEY, UUIDID
INT, SERIALInt
DECIMAL, FLOAT, NUMERICFloat
BOOLEAN, BITBoolean
VARCHAR, TEXT, DATEString

Example

Input
CREATE TABLE users (
  id UUID PRIMARY KEY,
  email VARCHAR(255) NOT NULL,
  full_name VARCHAR(120)
);
Output
type Users {
  id: ID!
  email: String!
  fullName: String
}

Frequently asked questions

Does it generate relation fields for foreign keys?
Not automatically — FK columns are emitted as scalar ID/Int fields. Add nested relation fields by hand once both types exist.
Can I use this for Apollo Federation?
Yes — the output is plain SDL and can be merged into any GraphQL schema, including Apollo Federation subgraphs.

Try it now

No signup, no install — runs entirely in your browser.

Open the SQL → GraphQL Generator →

⚠ Confirm Delete