API schema starting point

Convert SQLite to GraphQL SDL

Translate database entities into readable GraphQL type definitions, then adapt them to the needs of your application.

Open GraphQL SDL Exporter

Generate the schema

  1. Open the SQLite database.
  2. Review its entities in the ER diagram.
  3. Select GraphQL SDL as the export format.
  4. Export the type definitions and review them in your API project.
type Customer {
  id: Int!
  name: String
  orders: [Order!]
}

type Order {
  id: Int!
  customerId: Int!
}

SDL is not a complete API

A database schema describes storage, while GraphQL describes an application-facing contract. Generated SDL does not create resolvers, authentication, pagination, validation, mutations or field-level authorization. Treat it as a structured first draft.

Review type mappings

SQLite types do not map perfectly to GraphQL scalars. Dates may be stored as text or numbers, decimals may need a custom scalar, and binary data needs an application-specific representation. Rename technical database fields when a clearer API name is appropriate.

Never expose every database table automatically. Select only the fields and operations that clients should access, then enforce authorization in the API layer.

Use relationships deliberately

Declared foreign keys can suggest GraphQL relationships, but resolver behavior depends on your server implementation. Consider batching and pagination to avoid expensive nested database access.