Last active
March 22, 2017 05:39
-
-
Save mikeverbeck/734c75ef176795a77527 to your computer and use it in GitHub Desktop.
GraphQL PRO vs CON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRO: | |
- Self documenting. Exploring data becomes trivial. | |
- Mobile devs can request everything once | |
- Mobile devs only get the data they need | |
- You don’t have to know your active record relations. | |
CON: | |
- You have to manually write all end points | |
- Attributes can become bloated. Suppose we make a breaking update to an attribute. The solution is to create a new attribute. | |
TBD: | |
- How to limit attributes by user role | |
- Performance of nested finds. Does graphQL know how to optimize find to include associations. (Concerned with the performance implications) | |
- How does graphQL compare to jasonapi? | |
Wishlist: | |
- I wish it automatically built all the attributes as default string | |
Questions: | |
- Update/Create records need to be clearly defined. | |
- How do you add a where clause to a list |
Actually you probably want to avoid having multiple URL endpoints or more than one schema as it doesn't look like it was intended for that when considering how interfaces is designed. Maybe it's just a bug with InterfaceType though and will be fixed later. But basically if you have two schemas, if you use the same InterfaceType in the two schemas, using it the second time will wipe out @possible_types from the first schema because InterfaceType objects stores @possible_types on itself.
But this will probably be fixed in the future. Interface's possible types should be a property of the schema, not the interface.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe on the first CON, you actually mean:
fields
(In GraphQL terms) rather thanend points
? since there is only 1 endpoint (URL speaking), although nothing prevents us to create more URL endpoints