follows.ts 991 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { gql } from 'apollo-server-express'
  2. import { ChannelFollowsInfo } from '../../src/entities/ChannelFollowsInfo'
  3. export const GET_CHANNEL_FOLLOWS = gql`
  4. query GetChannelFollows($channelId: ID!) {
  5. channelFollows(channelId: $channelId) {
  6. id
  7. follows
  8. }
  9. }
  10. `
  11. export type GetChannelFollows = {
  12. channelFollows: ChannelFollowsInfo | null
  13. }
  14. export type GetChannelFollowsArgs = {
  15. channelId: string
  16. }
  17. export const FOLLOW_CHANNEL = gql`
  18. mutation FollowChannel($channelId: ID!) {
  19. followChannel(channelId: $channelId) {
  20. id
  21. follows
  22. }
  23. }
  24. `
  25. export const UNFOLLOW_CHANNEL = gql`
  26. mutation FollowChannel($channelId: ID!) {
  27. unfollowChannel(channelId: $channelId) {
  28. id
  29. follows
  30. }
  31. }
  32. `
  33. export type FollowChannel = {
  34. followChannel: ChannelFollowsInfo
  35. }
  36. export type FollowChannelArgs = {
  37. channelId: string
  38. }
  39. export type UnfollowChannel = {
  40. unfollowChannel: ChannelFollowsInfo
  41. }
  42. export type UnfollowChannelArgs = FollowChannelArgs