Published Sep 21, 2022

Episode 530: Tanmai Gopal on GraphQL

Discover the transformative potential of GraphQL as Tanmai Gopal, CEO of Hasura.io, joins Jeff Doolittle to unravel its foundational principles, practical applications, and its groundbreaking integration with modern systems, all while highlighting Hasura's role in enhancing API management with unique features and community engagement.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Integration

    GraphQL offers a versatile approach to API development, allowing integration with various data sources, including relational and NoSQL databases. explains that GraphQL can be implemented on top of existing systems, providing a flexible API surface for developers working at the edge, such as in mobile or serverless environments 1. This flexibility is crucial in enterprise settings where gradual transitions from REST to GraphQL are necessary. Gopal highlights the ability to create REST endpoints from GraphQL queries, facilitating seamless integration with existing REST infrastructure 2.

    You create the GraphQL query and you name it, and that becomes a REST endpoint.

    ---

       

    Query Management

    Managing GraphQL API queries involves optimizing data fetching and ensuring efficient communication between systems. discusses the importance of knowing query structures in advance to optimize database interactions, such as using joins or sharding based on data source capabilities 3. He emphasizes the need for flexible APIs in dynamic environments, where developers can query data as needed while maintaining security through execution quotas 4. This approach allows for asynchronous and automatic communication between systems, reducing the need for manual intervention.

    You might have very inefficient ways of fetching that data because you don't know what data you want upfront.

    ---

       

    Limitations

    While GraphQL is powerful, it is not always the best choice for every application. points out that GraphQL is unsuitable for non-JSON data types, such as video or binary files, and for applications with heavy write operations, like IoT devices emitting continuous data 5. In such cases, the benefits of GraphQL diminish, as it is primarily optimized for querying rather than mutations. Gopal advises against using GraphQL when the workload is predominantly write-heavy, suggesting alternative solutions that better handle such scenarios.

    If your API is 90% mutate and 10% query, you lose the benefits of GraphQL.

    ---

Related Episodes