Hello,
I’m hoping someone can help me to get a handle on how the CDA API calls are calculated. For starters, we are using GraphQL to fetch our content so this should count towards CDA API calls?
As an example scenario, I have a blog article that has some fields like title, slug, etc that are part of the Blog model as well as an image. There is also Social content associated with the Blog article. This model also has 4 modular blocks of content, each of which are used in this Blog article. In addition, there is an Author model and one of the Author records is associated with the Blog article. Finally, there is a Tag model and 2 tags are associated with the Blog article.
Below is an example of the GraphQL call:
fragment AuthorDetail on AuthorRecord {
name
title
description
email
photograph {
url
}
}
fragment TagsDetail on BlogArticleTagRecord {
title
secondaryNavigation
}
fragment Social on SeoField {
title
description
image {
url
}
}
fragment Body on BlogArticleModelBodyField {
...on RichTextRecord {
id
_modelApiKey
richText
}
... on WistiaIdRecord {
id
wistiaId
_modelApiKey
}
... on BlockquoteRecord {
id
blockquote
_modelApiKey
}
... on AppButtonRecord {
id
appButton
_modelApiKey
}
}
fragment BlogArticle on BlogArticleRecord {
id
author {
...AuthorDetail
}
tags {
...TagsDetail
}
social {
...Social
}
title
slug
description
body {
... Body
}
date
doNotShowOnIndexPage
}
{
allBlogArticles(orderBy: date_DESC, first: "1") {
...BlogArticle
}
}
Would the count of CDA calls be as follows:
Blog - 1 call
Modular content - 4 calls
Author - 1 call
Tags - 1 call
Social - 1 call
Total 8 calls as I assume this doesn’t all get lumped together as 1 call? Is this correct and also do images count as an additional part of the calls? Is there a way in the API Explorer to display how many calls you are using?
Also, for fetching content, will it almost always be hitting the CDN cache as I see the docs mention that an unlimited number of calls can be made. When would we not be hitting the cache? Only once for new records or once for updated content. Is everything on the preview GraphQL endpoint also hitting the cache or is that never cached so always counts towards the API call limit?
Thanks,
Jeff