Apps GraphQL API¶
When you publish your workspace, Smartmate will automatically setup GraphQL objects for each table of all your apps.
To avoid collisions in tables with the same name of different apps, the objects are created using the appId
as prefix.
For example, if you create a customerSupport
app, which has the customers
table, the system will create the customerSupport_customers
object.
Queries by PK¶
For each of the GraphQL objects, a by_pk
object is also created. This is useful for selecting an object by primary key.
Aggregate¶
Additionally, for each app object, both from the Smartmate GraphQL API and the Apps GraphQL API, an aggregate
object is created.
This object allows the following aggregations on your queries:
count: Count the records.
sum: Sum.
avg: Average.
stddev: Sample standard deviation.
stddev_samp: Sample standard deviation. Same as
stddev
.stddev_pop: Population standard deviation.
variance: Sample variance (square of the sample standard deviation).
var_samp: Sample variance (square of the sample standard deviation). Same as
variance
.var_pop: Population variance (square of the population standard deviation).
max: Max value.
min: Min value.
Aggregate objects also allow to include in the same request the data of the nodes
that were used for the aggregation.
Warning
While Smartmate is in beta, the aggregate object is available for all plans, but eventually it will be available only on the enterprise plan.