Developers building on CMS Hub Pro or Enterprise can take advantage of GraphQL to query for, and display, their HubSpot CRM object and HubDB data on CMS pages or emails using HubL. GraphQL can also be used to power external content or integrations using the public API. GraphQL allows developers to easily fetch all of their HubDB and CRM object data, and all relevant associated data at once, rather than making multiple API/HubL function calls to get associated CRM object data, or foreign ID/child HubDB table data. Additionally GraphQL makes it easy to sort and filter data, before working with it in HubL or JavaScript.
Please see our documentation for more details on working with GraphQL and check out the GraphiQL explorer for an easy way to write and test queries. If you're building on the HubSpot CMS, take a look at the sample GraphQL theme for examples of using GraphQL in HubSpot pages. You can also use the public GraphQL API to fetch data that you can use with your integration.
Watch developer advocate engineer David Adams and sr. dev advocate Jon McLaren, explain custom objects and demonstrate how to use GraphQL in this Essentials talk on YouTube.