videos.ts

import { getVideo, getVideos } from '../helpers/videos';

export const videosResolver = {
  Query: {
    video: async (parent, { videoId }, context) => {
      const video = await getVideo(context, videoId);
      return video;
    },
    videos: async (parent, args, context) => {
      return await getVideos(context);
    }
  }
};