3 ms·
Has anyone used odata? Do you prefer odata over graphql?
by makkesk8 8y ago
Has anyone used odata? Do you prefer odata over graphql?
- WorldMaker 8y agoI used OData in a past life. From what I've seen GraphQL is more capable/tunable. OData feels a bit more constrained to relational models/particular ORMs, and GraphQL is more flexible to homogenize data from multiple sources. I've seen some very bad OData performance issues, and generally wouldn't recommend its use outside of intranet/enterprise/non-public projects these days. GraphQL seems at first glance worse, but the ability to name queries alone provides a lot of tuning power (making profiling easier, and allowing for the potential to performance tune individual query patterns) and most of the good GraphQL engines provide at least some basic cost estimation systems to quota high cost queries, whereas the cost estimation of OData operators is trickier. Though really a lot of it comes down to productivity needs. There's still cases where everything is on a single SQL server and Breeze against a simple OData endpoint on the SQL schema is, well, a breeze, for a simple client app. But I'm growing increasingly convinced that GraphQL is better in the long run, and I think a key need right now is much better server-side .NET GraphQL libraries that work well with EF, and have some of the profiling and cost estimation tools you see over in Apollo Engine and the like.