Browse Source

query node - input schema minor fixes

ondratra 4 years ago
parent
commit
09f0950b10
1 changed files with 17 additions and 15 deletions
  1. 17 15
      query-node/schema.graphql

+ 17 - 15
query-node/schema.graphql

@@ -60,7 +60,12 @@ type Membership @entity {
 type ChannelCategory @entity {
 type ChannelCategory @entity {
   id: ID!
   id: ID!
 
 
-  name: String
+  "The name of the category"
+  name: String @fulltext(query: "channelCategoriesByName")
+
+  channels: [Channel!] @derivedFrom(field: "category")
+
+  happenedIn: Block!
 }
 }
 
 
 "Storage asset"
 "Storage asset"
@@ -209,11 +214,11 @@ type Channel @entity {
   "The description of a Channel"
   "The description of a Channel"
   description: String
   description: String
 
 
-  "Url for Channel's cover (background) photo. Recommended ratio: 16:9."
-  coverPhotoUrl: Asset
+  "Channel's cover (background) photo. Recommended ratio: 16:9."
+  coverPhoto: Asset
 
 
   "Channel's avatar photo."
   "Channel's avatar photo."
-  avatarPhotoUrl: Asset
+  avatarPhoto: Asset
 
 
   "Flag signaling whether a channel is public."
   "Flag signaling whether a channel is public."
   isPublic: Boolean
   isPublic: Boolean
@@ -229,15 +234,12 @@ type Channel @entity {
   happenedIn: Block!
   happenedIn: Block!
 }
 }
 
 
-type Category @entity {
+type VideoCategory @entity {
   "Runtime entity identifier (EntityId)"
   "Runtime entity identifier (EntityId)"
   id: ID!
   id: ID!
 
 
   "The name of the category"
   "The name of the category"
-  name: String! @unique @fulltext(query: "categoriesByName")
-
-  "The description of the category"
-  description: String
+  name: String @fulltext(query: "videoCategoriesByName")
 
 
   videos: [Video!] @derivedFrom(field: "category")
   videos: [Video!] @derivedFrom(field: "category")
 
 
@@ -281,7 +283,7 @@ type Video @entity {
   channel: Channel!
   channel: Channel!
 
 
   "Reference to a video category"
   "Reference to a video category"
-  category: Category
+  category: VideoCategory
 
 
   "The title of the video"
   "The title of the video"
   title: String @fulltext(query: "search")
   title: String @fulltext(query: "search")
@@ -292,11 +294,8 @@ type Video @entity {
   "Video duration in seconds"
   "Video duration in seconds"
   duration: Int
   duration: Int
 
 
-  "Video's skippable intro duration in seconds"
-  skippableIntroDuration: Int
-
-  "Video thumbnail url (recommended ratio: 16:9)"
-  thumbnailUrl: String
+  "Video thumbnail (recommended ratio: 16:9)"
+  thumbnail: Asset
 
 
   "Video's main langauge"
   "Video's main langauge"
   language: Language
   language: Language
@@ -336,6 +335,9 @@ type Video @entity {
   "Video media size in bytes"
   "Video media size in bytes"
   size: Int
   size: Int
 
 
+  "Reference to video asset"
+  media: Asset
+
   happenedIn: Block!
   happenedIn: Block!
 
 
   "Is video featured or not"
   "Is video featured or not"