According to the documentation at the link below, you can get the total amount of records from the meta object. (see below)
{
_allArtistsMeta {
count
}
}
However… there is no meta object with a count field anywhere in the api! And looking at Meta fields — DatoCMS… it also doesn’t exist in this part of the documentation!
hi @dev_dato1
pretty strage. Once you have a model, you should be able to do see its “meta” query in the graphql explorer
If you are using GatsbyJS, then your graphql query need to be adjusted because GatbyJS uses its own graphql dialect. The query, for my case, would be:
query MyQuery {
allDatoCmsDog {
totalCount
}
}
1 Like
Ow man, I thought _yourModelMeta was part of the model itself, not a separate query !
Apologies and thanks!