https://prefect.io logo
w

wiretrack

07/06/2021, 8:25 PM
Hey all, I’m digging a bit deeper on Prefect’s architecture, but I couldn’t quite understand the role of the three graphql services (Hasura, GraphQL and Apollo). I though Hasura already provided an endpoint and the platform to build mutations on top of it. So why would the GraphQL be needed? And if it’s to provide the mutations, the GraphQL already provides an endpoint as well, why is Apollo needed? Probably just a dumb question, but my only experience with GraphQL was plugging Hasura on top of Postgres, so I’m a bit lost on why the server was structured that way. Any insights?
k

Kevin Kho

07/06/2021, 9:30 PM
Hey @wiretrack, I’ll ask the team about this
z

Zanie

07/06/2021, 10:25 PM
Hi, Apollo provides a schema-stitching layer that combines both the Hasura and custom GraphQL schemas into a unified API. Hasura did not have custom mutations when we started using it so I don't know much about their functionality there. Right now, each tool is in a specialized niche. Hasura generates an API from Postgres and provides row-level object permissioning. Our GraphQL server builds custom mutations and queries on top Hasura. Apollo combines both schemas and provides some mechanisms for improving performance.
w

wiretrack

07/06/2021, 10:59 PM
Thanks @Zanie, yeah maybe Hasura Actions would be the equivalent to the GraphQL mutations, but I do think is fairly new to Hasura (I think it allows for custom mutations and for the controller to be managed on the backend, but I’ve never used it in production). Makes sense, I was just a bit lost when I saw the same interface for the GraphQL and Apollo services (the playground), but understood the logic, thanks.
4 Views