codegen-atlas.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. # Run codegen using: npm run generate
  2. # Make sure schema endpoint is accessible!
  3. schema:
  4. - https://orion.joystream.org/graphql # Atlas
  5. documents:
  6. - >
  7. query getVideoById($videoId: ID!) {
  8. videoByUniqueInput(where: {id: $videoId}) {
  9. ...VideoFields
  10. }
  11. }
  12. fragment VideoFields on Video {
  13. id
  14. title
  15. description
  16. reactions {
  17. id
  18. createdAt
  19. reaction
  20. memberId
  21. __typename
  22. }
  23. category {
  24. id
  25. name
  26. __typename
  27. }
  28. views
  29. duration
  30. createdAt
  31. isPublic
  32. isExplicit
  33. hasMarketing
  34. isCensored
  35. isCommentSectionEnabled
  36. commentsCount
  37. language {
  38. iso
  39. __typename
  40. }
  41. publishedBeforeJoystream
  42. mediaMetadata {
  43. ...VideoMediaMetadataFields
  44. __typename
  45. }
  46. media {
  47. ...StorageDataObjectFields
  48. __typename
  49. }
  50. thumbnailPhoto {
  51. ...StorageDataObjectFields
  52. __typename
  53. }
  54. channel {
  55. ...BasicChannelFields
  56. __typename
  57. }
  58. license {
  59. ...LicenseFields
  60. __typename
  61. }
  62. nft {
  63. ...AllNftFields
  64. __typename
  65. }
  66. __typename
  67. }
  68. fragment VideoMediaMetadataFields on VideoMediaMetadata {
  69. id
  70. pixelHeight
  71. pixelWidth
  72. __typename
  73. }
  74. fragment StorageDataObjectFields on StorageDataObject {
  75. id
  76. createdAt
  77. size
  78. isAccepted
  79. ipfsHash
  80. storageBag {
  81. id
  82. __typename
  83. }
  84. type {
  85. __typename
  86. }
  87. __typename
  88. }
  89. fragment BasicChannelFields on Channel {
  90. id
  91. title
  92. createdAt
  93. views
  94. follows
  95. avatarPhoto {
  96. ...StorageDataObjectFields
  97. __typename
  98. }
  99. ownerMember {
  100. ...BasicMembershipFields
  101. __typename
  102. }
  103. __typename
  104. }
  105. fragment BasicMembershipFields on Membership {
  106. id
  107. handle
  108. controllerAccount
  109. metadata {
  110. avatar {
  111. ... on AvatarObject {
  112. avatarObject {
  113. ...StorageDataObjectFields
  114. __typename
  115. }
  116. __typename
  117. }
  118. ... on AvatarUri {
  119. avatarUri
  120. __typename
  121. }
  122. __typename
  123. }
  124. about
  125. __typename
  126. }
  127. __typename
  128. }
  129. fragment LicenseFields on License {
  130. id
  131. code
  132. attribution
  133. customText
  134. __typename
  135. }
  136. fragment AllNftFields on OwnedNft {
  137. id
  138. createdAt
  139. creatorRoyalty
  140. lastSaleDate
  141. lastSalePrice
  142. ownerMember {
  143. ...BasicMembershipFields
  144. __typename
  145. }
  146. creatorChannel {
  147. ...BasicChannelFields
  148. __typename
  149. }
  150. transactionalStatusAuction {
  151. id
  152. auctionType {
  153. __typename
  154. ... on AuctionTypeEnglish {
  155. duration
  156. extensionPeriod
  157. minimalBidStep
  158. plannedEndAtBlock
  159. __typename
  160. }
  161. ... on AuctionTypeOpen {
  162. bidLockDuration
  163. __typename
  164. }
  165. }
  166. isCompleted
  167. initialOwner {
  168. ...BasicMembershipFields
  169. __typename
  170. }
  171. buyNowPrice
  172. startingPrice
  173. startsAtBlock
  174. endedAtBlock
  175. topBid {
  176. ...BasicBidFields
  177. __typename
  178. }
  179. bids {
  180. ...BasicBidFields
  181. __typename
  182. }
  183. whitelistedMembers {
  184. ...BasicMembershipFields
  185. __typename
  186. }
  187. __typename
  188. }
  189. transactionalStatus {
  190. __typename
  191. ... on TransactionalStatusIdle {
  192. dummy
  193. __typename
  194. }
  195. ... on TransactionalStatusBuyNow {
  196. price
  197. __typename
  198. }
  199. }
  200. video {
  201. ...BasicVideoFields
  202. __typename
  203. }
  204. __typename
  205. }
  206. fragment BasicBidFields on Bid {
  207. bidder {
  208. ...BasicMembershipFields
  209. __typename
  210. }
  211. amount
  212. createdAt
  213. isCanceled
  214. createdInBlock
  215. id
  216. __typename
  217. }
  218. fragment BasicVideoFields on Video {
  219. id
  220. title
  221. views
  222. createdAt
  223. duration
  224. title
  225. isPublic
  226. media {
  227. ...StorageDataObjectFields
  228. __typename
  229. }
  230. channel {
  231. ...BasicChannelFields
  232. __typename
  233. }
  234. thumbnailPhoto {
  235. ...StorageDataObjectFields
  236. __typename
  237. }
  238. nft {
  239. ...BasicNftFields
  240. __typename
  241. }
  242. __typename
  243. }
  244. fragment BasicNftFields on OwnedNft {
  245. id
  246. createdAt
  247. creatorRoyalty
  248. ownerMember {
  249. ...BasicMembershipFields
  250. __typename
  251. }
  252. transactionalStatus {
  253. __typename
  254. }
  255. __typename
  256. }
  257. - >
  258. query getDistributionBucketsWithOperators {
  259. distributionBuckets(limit: 50, where: {distributing_eq: true}) {
  260. id
  261. bags {
  262. id
  263. __typename
  264. }
  265. operators {
  266. ...DistributionBucketOperatorField
  267. __typename
  268. }
  269. __typename
  270. }
  271. }
  272. fragment DistributionBucketOperatorField on DistributionBucketOperator {
  273. id
  274. metadata {
  275. nodeEndpoint
  276. __typename
  277. }
  278. status
  279. __typename
  280. }
  281. generates:
  282. ./src/qntypes-atlas.ts:
  283. plugins:
  284. - typescript
  285. - typescript-operations
  286. - typescript-graphql-request