And one question from me personally. Are there any plans or ideas of CRUD standard for GraphQL? (or maybe it exists already)
h
hvdklauw
03/09/2018, 12:30 PM
Isn’t the whole point of graphql to not need to put everything in the limited CRUD boxes?
hvdklauw
03/09/2018, 12:31 PM
It’s queries to get data and mutations to well.. mutate the data. So the mutations map to C, U and D, but are much more flexible and R are your queries
y
yarax
03/09/2018, 12:45 PM
You are absolutely right, but that flexibility makes you to create a lot of bootstrap code every time. My point or even early suggestion is to have 1) naming conventions for standard CRUD operations 2) Schema/resolvers generators for such basic stuff, which then of course can be extended
h
hvdklauw
03/09/2018, 1:36 PM
Oh I agree, generally prefix your mutations with update/delete/create, queries is sometimes a bit trickier because what you as backend developer is not always the main reason it will get used on the frontend.
hvdklauw
03/09/2018, 1:37 PM
For instance say I have brands and product (product has a brand). Now to get the products for a brand I could get the brand and then filter the products on the brand to get results. With graphql you could also find the brand, limit to 1 result and then also asks for it’s products