GraphQL powered RESTful API
Blog post from Tines
Tines has historically faced challenges in synchronizing its REST API with the web app due to the use of different data fetching and updating methods, leading to limited access to new features like Folders and Teams through the REST API. To address this, Tines decided to integrate its existing GraphQL API, which powers the entire web app, to also serve the REST API. This approach allows for features to be implemented once and instantly available across both APIs, leveraging extensive testing and built-in advantages of GraphQL like type validation, versioning, and request parameter validations. Although a fully exposed GraphQL API might be considered in the future, REST remains more accessible to users. To streamline the process, Tines developed a declarative syntax for defining REST API endpoints, facilitating the creation and updating of these endpoints by specifying the corresponding GraphQL query and response transformation. This integration has enabled Tines to achieve feature parity between the web app and REST API, laying the groundwork for further enhancements such as versioning and cursor-based pagination.