Skip to content

Commit

Permalink
docs: better document query descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kareemmahlees committed Dec 28, 2024
1 parent 32f76f7 commit a8a9270
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions internal/graph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a8a9270

Please sign in to comment.