API Reference

Database browser

Browse the application database through structured operations, not arbitrary SQL. All database operations require Developer Mode; otherwise they return “No permission: developer mode is disabled”.

Type Definitions

graphql
type Mutation {
  createDbTableRow(table: String!, row: JSON!): Boolean!
  deleteDbTableRows(table: String!, ids: [String!]!): Boolean!
}

type Query {
  dbPath: String!
  dbTableRowCount(table: String!): Long!
  dbTableRows(table: String!, offset: Int!, limit: Int!): [JSON!]!
  dbTables: [DbTable!]!
}

enum DbColumnType {
	TEXT
	INTEGER
	REAL
	BLOB
	NUMERIC
	UNKNOWN
}

type DbTable {
	name: String!
	createSql: String!
	columns: [DbTableColumn!]!
}

type DbTableColumn {
	name: String!
	dataType: DbColumnType!
	notNull: Boolean!
	defaultValue: String
	primaryKey: Boolean!
}

scalar JSON

scalar Long

Operations

mutation

createDbTableRow

Insert a row from a JSON object; requires Developer Mode. Non-object input is rejected; invalid database rows return false.

graphql
mutation createDbTableRow($table: String!, $row: JSON!) {
  createDbTableRow(table: $table, row: $row)
}
mutation

deleteDbTableRows

Delete the selected table rows by their identity values; requires Developer Mode.

graphql
mutation deleteDbTableRows($table: String!, $ids: [String!]!) {
  deleteDbTableRows(table: $table, ids: $ids)
}
query

dbPath

Read the application SQLite database path; requires Developer Mode.

graphql
query dbPath {
  dbPath
}
query

dbTableRowCount

Count a table's rows; requires Developer Mode.

graphql
query dbTableRowCount($table: String!) {
  dbTableRowCount(table: $table)
}
query

dbTableRows

Read paginated rows as JSON objects; requires Developer Mode. Cell values remain strings or null; no JSON.parse is needed.

graphql
query dbTableRows($table: String!, $offset: Int!, $limit: Int!) {
  dbTableRows(table: $table, offset: $offset, limit: $limit)
}
query

dbTables

List table names in the application database; requires Developer Mode.

graphql
query dbTables {
  dbTables { name createSql }
}