query GetVideosConnection($first: Int, $after: String, $_v0_where: VideoWhereInput, $_v0_orderBy: [VideoOrderByInput!]) {
  videosConnection(first: $first, after: $after, where: $_v0_where, orderBy: $_v0_orderBy) {
    edges {
      cursor
      node {
        ...VideoFields
        __typename
      }
      __typename
    }
    pageInfo {
      hasNextPage
      endCursor
      __typename
    }
    totalCount
    __typename
  }
}

fragment VideoFields on Video {
  id
  title
  description
  category {
    id
    name
    __typename
  }
  views
  duration
  createdAt
  isPublic
  isExplicit
  isFeatured
  hasMarketing
  isCensored
  language {
    iso
    __typename
  }
  publishedBeforeJoystream
  mediaMetadata {
    ...VideoMediaMetadataFields
    __typename
  }
  media {
    ...StorageDataObjectFields
    __typename
  }
  thumbnailPhoto {
    ...StorageDataObjectFields
    __typename
  }
  channel {
    ...BasicChannelFields
    __typename
  }
  license {
    ...LicenseFields
    __typename
  }
  __typename
}

fragment VideoMediaMetadataFields on VideoMediaMetadata {
  id
  pixelHeight
  pixelWidth
  __typename
}

fragment StorageDataObjectFields on StorageDataObject {
  id
  createdAt
  size
  isAccepted
  ipfsHash
  storageBag {
    id
    __typename
  }
  type {
    __typename
  }
  __typename
}

fragment BasicChannelFields on Channel {
  id
  title
  createdAt
  views
  follows
  avatarPhoto {
    ...StorageDataObjectFields
    __typename
  }
  ownerMember {
    controllerAccount
  }  
  __typename
}

fragment LicenseFields on License {
  id
  code
  attribution
  customText
  __typename
}
