The GraphQL stack: How everything fits together
My main concern with GraphQL is access control. What happens if the user doesn't have access to part of the requested data (a subtree)... Will the GraphQL engine return an incomplete result, an inline error or will the whole query fail? What if you only want to allow showing specific fields of a resource; for example when a user requests for another user's account details, we need a way to block them from getting certain fields like passwords or keys that might be attached to the account.<p>How does this access control play with cache? What happens when the access control rules change?<p>A while ago, I wrote a real-time REST-based plugin which solves all the problems and I use it in production, it's much simpler than GraphQL. See <a href="https://github.com/SocketCluster/sc-sample-inventory" rel="nofollow">https://github.com/SocketCluster/sc-sample-inventory</a><p>I'm surprised that more libraries aren't following the REST-based model.