Program not pulling all information through

I am working on a HubSpot website project. I am trying to create a module that displays documents for our individual contacts that login to our site. I created a custom object that is associated to a deal. So my current code is pulling all deals that I am interested in that are associated with the contact who is signed in and then pulling all the documents that are associated with the deals. The issue is its not pulling over all the documents, only about the first dozen or so depending on the contact.

{% if request.query_dict.impersonate %}
{% set userId = request.query_dict.impersonate %}
{% else %}
{% set userId = request.contact.contactVid %}
{% endif %}

{% if request.contact %}
{% set deals = crm_associations(userId, “HUBSPOT_DEFINED”, 4, “limit=100”) %}
{% set filteredDocuments = [] %}

{# Loop over each deal to find associated documents #}
{% for deal in deals.results %}
{% set dealId = deal.id %}
{% set documents = crm_associations(dealId, “USER_DEFINED”, x, “limit=100”, “document_title, document_link, document_type, date”) %}
{# Append each document to the filteredDocuments list #}
{% for document in documents.results %}
{% do filteredDocuments.append(document) %}
{% endfor %}
{% endfor %}

{% endif %}

@SConner11
crm_associations can only be called up to 10 times so if your deal for loop is running over more than 10 items crm_associations will stop running after the 10th one.
If you need to get a lot of data it’d likely make more sense for you to use GraphQL, though it is only available to Content Hub Professional and above, or the Deals API.