1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import { gql } from 'apollo-server-express'
- import { FeaturedVideo, VideoHero } from '../../src/models/FeaturedContent'
- import { CategoryFeaturedVideos } from '../../src/entities/CategoryFeaturedVideos'
- export const GET_VIDEO_HERO = gql`
- query GetVideoHero {
- videoHero {
- heroTitle
- heroVideoCutUrl
- heroPosterUrl
- videoId
- }
- }
- `
- export type GetVideoHero = {
- videoHero: VideoHero | null
- }
- export const GET_CATEGORY_FEATURED_VIDEOS = gql`
- query GetCategoryFeaturedVideos($categoryId: ID!) {
- categoryFeaturedVideos(categoryId: $categoryId) {
- videoCutUrl
- videoId
- }
- }
- `
- export type GetCategoryFeaturedVideos = {
- categoryFeaturedVideos: {
- videoId: string
- videoCutUrl: string
- }
- }
- export type GetCategoryFeaturedVideosArgs = {
- categoryId: string
- }
- export type GetAllCategoriesFeaturedVideosArgs = {
- videosLimit: number
- }
- export const GET_ALL_CATEGORIES_FEATURED_VIDEOS = gql`
- query GetAllCategoriesFeaturedVideos($videosLimit: Int!) {
- allCategoriesFeaturedVideos(videosLimit: $videosLimit) {
- categoryId
- categoryFeaturedVideos {
- videoId
- videoCutUrl
- }
- }
- }
- `
- export type GetAllCategoriesFeaturedVideos = {
- allCategoriesFeaturedVideos: CategoryFeaturedVideos[] | null
- }
- export const SET_VIDEO_HERO = gql`
- mutation SetVideoHero($newVideoHero: VideoHeroInput!) {
- setVideoHero(newVideoHero: $newVideoHero) {
- videoId
- heroTitle
- heroVideoCutUrl
- heroPosterUrl
- }
- }
- `
- export type SetVideoHero = {
- setVideoHero: VideoHero
- }
- export type SetVideoHeroArgs = {
- newVideoHero: {
- videoId: string
- heroTitle: string
- heroVideoCutUrl: string
- heroPosterUrl: string
- }
- }
- export const SET_CATEGORY_FEATURED_VIDEOS = gql`
- mutation SetCategoryFeaturedVideos($categoryId: ID!, $videos: [FeaturedVideoInput!]!) {
- setCategoryFeaturedVideos(categoryId: $categoryId, videos: $videos) {
- videoId
- videoCutUrl
- }
- }
- `
- export type SetCategoryFeaturedVideos = {
- setCategoryFeaturedVideos: FeaturedVideo[]
- }
- export type SetCategoryFeaturedVideosArgs = {
- categoryId: string
- videos: FeaturedVideo[]
- }
|