Yes, it is possible to design and develop a website in Webflow and then connect a third-party headless CMS using custom JavaScript code with API calls. Webflow provides a feature called "Custom Code" that allows you to add your own HTML, CSS, and JavaScript code to your project.
To connect a third-party headless CMS, such as Hygraph or Sanity, you would need to use their respective APIs to make API calls and retrieve the content. You can use JavaScript fetch, axios, or any other HTTP request library to make these API calls.
Typically, you would write your custom JavaScript code within the Webflow Designer or Editor interface. You can do so by adding a custom code embed element to your Webflow project, and then writing your JavaScript code directly within that element or referencing an external JavaScript file.
Regarding GraphQL integration, Webflow doesn't natively support GraphQL integration. However, you can still use a third-party service like Apollo Client or something similar to query and interact with a GraphQL API within your Webflow project.
To integrate a GraphQL API, you would generally follow the same process as connecting with a REST API. You would need to make GraphQL requests using JavaScript, either with fetch or a library like Apollo Client. You can write custom JavaScript code in the custom code embed element or an external JavaScript file within Webflow.
Remember to properly authenticate and handle any necessary security aspects when working with APIs to ensure the security and privacy of your website and its content.
Overall, while Webflow doesn't have built-in support for specific third-party headless CMS platforms or GraphQL, you can still leverage custom JavaScript code and API calls to connect and interact with them within your Webflow project.