APIs & Integrations

pankildesai
Member

GraphQL Query not Not retrieving All Deals

Hello Support, We are using GraphQL query to retrieve Deal Collection based on the filters. We have applied the same filter on UI. On UI it is fetching 137 Deals where on GraphQL it is only fetching 60 records only.

Here i am attaching the query that is used to fetch deals.

 

 

 

query dealforcompany {
  CRM {
    deal_collection(
      filter: {dealstage__in: ["closedwon", "133731357", "143663907", "23925584"], pipeline__in: ["default", "9904898", "74974003"]}
      limit: 500
      offset: 0
    ) {
      items {
        hs_object_id
        dealname
        dealstage
        pipeline
        dealtype
        number_of_licenses
        pid
        associations {
          company_collection__primary {
            items {
              name
              lifecyclestage
              number_of_paid_student_licenses__c
              pid_text__c
              account_type__c
            }
          }
        }
      }
    }
  }
}

 

 

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

GraphQL Query not Not retrieving All Deals

Hi @pankildesai 👋 Thanks for your question. Without having access to your portal to compare the results returned versus what your query is returning, it's tough to say what might be causing the difference. If you haven't already, I'd start by capturing and comparing specific example records that appear in the UI but are missing in the API response to understand any differences in their data. 

 

Hey @Teun @Kevin-C, do you have any additional GraphQL troubleshooting tips for @pankildesai?

 

Thank you very much for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes