News for hackers. Stuff that matters.
Re:GraphQL is the King, R-I-P Rest by atmartins on Saturday December 03, 2016 @01:02AM (#13094573)
What about permissions? What if the logged in user is only allowed to see certain fields? Do I make a table that describes every possible field and which roles can access it? How do I know what's available to query, without reading docs? What about hypermedia? Do I have to gain knowledge about a large system's data structure to query it?
Re:GraphQL is the King, R-I-P Rest by rkv on Saturday December 03, 2016 @01:38AM (#13094666)
>What about permissions? What if the logged in user is only allowed to see certain fields? Do I make a table that describes every possible field and which roles can access it?

GraphQL is permission agnostic which allows you to develop your own methods. But there are a lot of nice implementations floating around [1].

>How do I know what's available to query, without reading docs?

Introspection[2].

1. https://github.com/joonhocho/graphql-rule

2. http://graphql.org/learn/introspection

Re:GraphQL is the King, R-I-P Rest by atmartins on Saturday December 03, 2016 @10:21PM (#13098630)
I appreciate the answer. It looks like I do want to create a rule for each property. Why? Why not create meaningful objects and not micro-manage individual properties? In case I want to update my front end query in the future? Shouldn't I just make my objects more granular, rather than this extreme of managing individual properties? I'm genuinely interested from an architectural standpoint what the real gain is here, it really seems like there are major portions of a useful api that are not discussed when I've looked in to GraphQL.