GraphQL queries are used to fetch data via the workspace API.
8base's GraphQL engine auto-generates queries as part of the GraphQL schema based on your workspace tables. All workspace tables can be queried through the workspace endpoint.
Whenever a table is added to a work space, two GraphQL query operations are auto-generated for the table. They are:
idand any unique value as an argument to retreive a single record from the database.
tableNameList(...)- Accepts filter, sort, skip, after, before, first, withDeleted, and, last to retrive a list of curated records while supporting pagination, relational-filtering, sorting, and more.
8base responds to the following query arguments when specified for lists.
- filter. Filters records based on field values.
- orderBy. [DEPRECIATING - Use sort]
- sort. Sort order configuration. Can be single- or multi- field sorting.
- first. Limit query to first N records. Default and maximum value is 5000.
- skip. Skip N records from the result.
- last. Return N last records from the result.
- after. Return records after specified ID. Used for cursor-based pagination.
- before. Return records before specified ID. Used for cursor-based pagination.
- withDeleted. Includes records in response that have previously been deleted.
- extraFields. ExtraFields allow developers to specify calculated results that get returned in the API response, depending on the field type.