folkloreinc/laravel-graphql

default (abstract) queries and mutations "crud"

adminfriso opened this issue · 0 comments

So I am wondering, is there a way to generate the queries and mutations, and maybe even the types.
Mainly the mutations and queries are all the same.
queries( get 1 type, get all types)
mutations( createType, updateType, deleteType)
For example in a blog, the Article and Comments are quite repetative in creating the same queries and mutations.
Even more idealitair is that of creating a type out of an eloquent model. Just pass an array of models in which you want the default 'crud' operations to be active.
There of course are some cases in which this does not cover the usecase, EG authentication in which you want to write a 'custom' type ,query and mutation.

I hope it already exists, or if someone could explain why this isn't already a feature.

Great respect to all working on this repo, maybe I could help on this feature if it does not already exists.