<@U0RQY0KK5> I’m beginning to make something bigge...
# prisma-whats-new
e
@nilan I’m beginning to make something bigger than the typical examples with Graph.cool. I can see a lot of boilerplates around the handling of the data (like
update
,
subscribe
, etc...), things that seems to be repeated all the time. Before I try to create my own boilerplate codes around these routines, might there be some already existing library to handle these annoying tasks?
🙏🏻 1
a
@eliezedeck +1 for your offer to create a Graphcool SDK, that deals with all of that. 😉 Please share! 😄
e
Well, this sort of thing should already exist somewhere though. Hence the question 😉
a
The most you can get are the GraphQL client libraries I guess...
n
I'm not sure I understand what you're asking, can you elaborate?
a
A wrapper around the existing GraphQL client libraries that is more suited to the specific implementation details of Graphcool
That hides away some of the repeating implementation details by, for exampling, exposing default mutations as methods.
e
Thanks @agartha, those, along things like making for instance a specific Query + Subscription seem like a single entity that will do the right thing upong DELETED, CREATED, etc..., as well as automatic handling of optimistic UI, etc... But what I’m really looking for is to make Query + Subscriptions become like a seemless Live-query of some sort. Of course, it will be opinionated, but that’s fine. Also, something that would make handling the data, in or out, faster. I find myself doing a lot of boilerplates just to handle data.
👍🏻 1
I’m thinking of something with more generic approach, not just specific to Graph.cool though
a
So more like a helper library, @eliezedeck ?
e
Yes
a
Maybe you can find some helpful libraries/tools/examples here: https://github.com/chentsulin/awesome-graphql
e
I’m using VueJS which relieves me from a lot of boilerplates. Things like that should already exist, because I do not believe in writing the long codes that I see in Apollo or Graph.cool examples.
👍🏻 1
Alright, thanks for that 😄
n
do you think the way the examples here are setup can be improved? https://github.com/graphcool-examples/vue-graphql
e
@nilan I thinks so! I mean, I’m not a pro in either Vue or GraphQL, but to me, it looks likes the old days of PHP: you had to write all sorts of operations. For example, the Query and the Subscription should be closer together. Avoiding the
refetch
, after all, it’s already using a subscription, and combining the
update
handler of both the Query + Subscription. I agree that it was written with the intent to make newcomers understand everything that is going-on instead of presenting a magic API. But for big production software, these should and can be reduces with some helpers. Unfortunately, such thing doesn’t seem to exist yet.
@agartha there seems to be no such thing in the Awesome GraphQL at this time.