From 9a121c1a5111450a43d95d407729e47d3a91fc26 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 19 Jul 2021 22:52:42 +0800 Subject: [PATCH] docs: revise gql page structure Signed-off-by: Wing-Kam Wong --- .../en/developer-resources/graphql-apis.md | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/packages/noco-docs/content/en/developer-resources/graphql-apis.md b/packages/noco-docs/content/en/developer-resources/graphql-apis.md index 8b9932433d..b504cccb55 100644 --- a/packages/noco-docs/content/en/developer-resources/graphql-apis.md +++ b/packages/noco-docs/content/en/developer-resources/graphql-apis.md @@ -2,31 +2,31 @@ title: 'GraphQL APIs' position: 2 category: 'Developer Resources' -fullscreen: true menuTitle: 'GraphQL APIs' --- -# Features -* APIs - * Generates GraphQL APIs for **ANY** MySql, Postgres, MSSQL, Sqlite database :fire: - * Serves GraphQL queries irrespective of naming conventions of primary keys, foreign keys, tables etc :fire: - * Support for composite primary keys :fire: - * Usual suspects : CRUD, List, FindOne, Count, Exists, Distinct - * Pagination - * Sorting - * Column filtering - Fields :fire: - * Row filtering - Where :fire: - * Bulk insert, Bulk delete, Bulk read :fire: - * Relations - automatically detected - * Aggregate functions - * More - * Upload single file - * Upload multiple files - * Download file + +## Features + +* Generates GraphQL APIs for **ANY** MySql, Postgres, MSSQL, Sqlite database :fire: +* Serves GraphQL queries irrespective of naming conventions of primary keys, foreign keys, tables etc :fire: +* Support for composite primary keys :fire: +* Usual suspects : CRUD, List, FindOne, Count, Exists, Distinct +* Pagination +* Sorting +* Column filtering - Fields :fire: +* Row filtering - Where :fire: +* Bulk insert, Bulk delete, Bulk read :fire: +* Relations - automatically detected +* Aggregate functions +* More + * Upload single file + * Upload multiple files + * Download file * Authentication * Access Control -# GraphQL API Overview +## API Overview ### Query @@ -54,7 +54,7 @@ menuTitle: 'GraphQL APIs' | [TableName**UpdateBulk**](#tablenamebulk) | data: [TableNameInput] | [Int] | Bulk row update | | [TableName**DeleteBulk**](#tablenamedeletebulk) | data: [TableNameInput] | [Int] | Bulk row delete | -## Query Arguments +### Query params | **Param** | **Description** | **Default value** |**Example Value**| |---|---|---|---| @@ -86,7 +86,6 @@ like - 'like' - (colName,like,%name) PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,2000))") ``` - #### Logical operators ``` ~or - 'or' @@ -94,6 +93,8 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20 ~not - 'not' ``` +## Examples + ### TableNameList @@ -243,13 +244,6 @@ CountryList { - - - - - - - #### List + where + sort + offset