ColeWalker / twitch-graphql

A GraphQL wrapper for the twitch api
MIT License
14 stars 2 forks source link

We do not need to have explicit resolvers for most of our properties #132

Closed ColeWalker closed 3 years ago

ColeWalker commented 4 years ago

Unless we rename a property, graphql can do a lot of the work involved for us.

ColeWalker commented 4 years ago

Example can be found in the redemption pubsub module.

I also have a digital garden post on this subject.

ColeWalker commented 4 years ago

https://spin.atomicobject.com/2018/07/25/apollo-default-resolver/

https://github.com/ColeWalker/twitch-graphql/blob/master/src/schema/game-type-schema.ts

In game-type-schema, we don't need any of the game-type resolvers.

CodeItQuick commented 4 years ago

Cole - These tests hit the twitch API. My wallaby.js continually runs the tests, I'm going to be hitting the API a ton. I really think you should mock out the reply for each endpoint and use that, or do something similar....

ColeWalker commented 4 years ago

Ah I see, I will have to add an issue for that.