Skip to content

Commit

Permalink
feat: ✨ BREAKING CHANGE: remove unused resolvers (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeWalker authored Nov 22, 2020
1 parent 0ff74cd commit ccfd861
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 55 deletions.
2 changes: 1 addition & 1 deletion src/schema/follow-pubsub-type-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const FollowPubSubResolvers = {
},
},
}
// TODO: follow user link type

export const FollowPubSubSchema = gql`
type FollowSubscription {
followDate: String
Expand Down
12 changes: 0 additions & 12 deletions src/schema/game-type-schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createModule, gql } from 'graphql-modules'
import { HelixGame } from 'twitch'
import { ApiClient } from 'twitch'
import RefreshToken from '../helpers/RefreshToken'

Expand All @@ -16,17 +15,6 @@ export const GameResolvers = {
return game
},
},
Game: {
id(game: HelixGame) {
return game.id
},
name(game: HelixGame) {
return game.name
},
boxArtUrl(game: HelixGame) {
return game.boxArtUrl
},
},
}

export const GameSchema = gql`
Expand Down
26 changes: 0 additions & 26 deletions src/schema/stream-type-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,6 @@ export const StreamResolvers = {
}
},
},
Stream: {
language(stream: HelixStream) {
return stream.language
},
gameId(stream: HelixStream) {
return stream.gameId
},
id(stream: HelixStream) {
return stream.id
},
title(stream: HelixStream) {
return stream.title
},
viewers(stream: HelixStream) {
return stream.viewers
},
thumbnailUrl(stream: HelixStream) {
return stream.thumbnailUrl
},
userDisplayName(stream: HelixStream) {
return stream.userDisplayName
},
userId(stream: HelixStream) {
return stream.userId
},
},
}

export const StreamSchema = gql`
Expand Down
16 changes: 1 addition & 15 deletions src/schema/subscriber-type-schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createModule, gql } from 'graphql-modules'
import { getLatestSub } from '../subscriptions/GetLatestSub'
import { ApiClient, HelixSubscription } from 'twitch'
import { ApiClient } from 'twitch'
import { getSubs } from '../subscriptions/GetSubs'
import { getCurrentSubCount } from '../subscriptions/SubCount'
import { getRandomSub } from '../subscriptions/GetRandomSub'
Expand Down Expand Up @@ -65,20 +65,6 @@ export const SubscriberResolvers = {
return allSubs.find((sub) => sub.userDisplayName === args?.displayName)
},
},
Subscriber: {
async userId(obj: HelixSubscription) {
return obj.userId
},
async userDisplayName(obj: HelixSubscription) {
return obj.userDisplayName
},
async isGift(obj: HelixSubscription) {
return obj.isGift
},
async tier(obj: HelixSubscription) {
return obj.tier
},
},
}

export const SubscriberSchema = gql`
Expand Down
1 change: 0 additions & 1 deletion src/schema/user-type-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const UserResolvers = {
},
User: {
displayName(user: HelixUser) {
HelixFollow
return user.displayName
},
description(user: HelixUser) {
Expand Down

0 comments on commit ccfd861

Please sign in to comment.