From a8a9270aa0bfdae0d8697f6186de4d2ae213e234 Mon Sep 17 00:00:00 2001 From: Kareem Ebrahim Date: Sat, 28 Dec 2024 21:23:28 +0200 Subject: [PATCH] docs: better document query descriptions --- internal/graph/schema.graphql | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/graph/schema.graphql b/internal/graph/schema.graphql index 90db9f3..6533d60 100644 --- a/internal/graph/schema.graphql +++ b/internal/graph/schema.graphql @@ -3,20 +3,25 @@ # https://gqlgen.com/getting-started/ type Query { - "returns a list of all databases" + "Returns a list of all available databases" databases: [String] - "return a list of all tables" + "Return a list of all available tables" tables: [String] - "returns the info of a single table" - table(name: String): [TableInfo] + "Returns info about the columns of a table" + table(name: String): [ColumnInfo] } -"Table info like field name returned from table query" -type TableInfo { +"Several info about a table column" +type ColumnInfo { + "Column name" name: String + "Column data type" type: String + "If the table accepts null values or not" nullable: String + "Constraint name of the column, e.g PRI" key: Any + "Column default value" default: Any }