Joystream Stats fcbd88a006 merge archived helpdesk | před 2 roky | |
---|---|---|
.. | ||
README.md | před 2 roky |
Some useful examples can be found below. Through these examples, alongside the helpers found in the docs, it should be possible to deduce the information required for the role.
Some (presumably most) relevant info about a channel with a specific id
:
query {
channels (where:{id_eq:2 }) {
id
createdAt
updatedAt
createdInBlock
title
category {
name
}
ownerMember {
id
handle
channels {
id
title
}
}
coverPhotoAvailability
avatarPhotoAvailability
coverPhotoDataObject {
joystreamContentId
size
}
avatarPhotoDataObject {
joystreamContentId
size
}
isCensored
isPublic
}
languages {
iso
}
videos {
id
title
mediaAvailability
thumbnailPhotoAvailability
}
}
Some (presumably most) relevant info about a video with a specific id
:
query {
videos (where:{id_eq:1 }) {
id
createdAt
updatedAt
updatedById
deletedAt
deletedById
channel {
id
title
ownerMember {
id
about
handle
controllerAccount
}
}
category {
id
name
}
title
description
duration
thumbnailPhotoAvailability
language {
iso
}
hasMarketing
publishedBeforeJoystream
isPublic
isCensored
isExplicit
license {
code
customText
attribution
}
mediaDataObject {
joystreamContentId
size
liaison {
workerId
metadata
}
}
mediaAvailability
mediaMetadataId
createdInBlock
isFeatured
}
}
To get videos updated after a certain timestamp
:
query {
videos (where:{updatedAt_gt:"2021-05-29" }) {
id
createdAt
updatedAt
}
}
query {
videos (where:{updatedAt_gt:"2021-05-29T08:00:00Z" }) {
id
createdAt
updatedAt
}
}
To get first n
videos created:
query {
videos (limit:10, orderBy:createdInBlock_ASC){
id
title
createdAt
createdInBlock
}
}
To get last n
videos created:
query {
videos (limit:10, orderBy:createdInBlock_DESC){
id
title
createdAt
createdInBlock
}
}
To get all videos created before some timestamp
, and updated afters some other timestamp
query {
videos (where:{updatedAt_gt:"2021-05-31T08:00:00Z",createdAt_lt:"2021-05-31T07:00:00Z"}) {
id
title
createdAt
updatedAt
}
}
See examples above for syntax.
The default limit is always 50, but this can be modified by adding (limit: <number>)
.
If you want to order by some specific parameter, click "docs" -> and select the query you are looking for. Then scroll down to ARGUMENTS
, and click orderBy
to show the options available in the class.
query {
<yourClass> (orderBy:something_ASC)
}
Same as above, but click where
.
```
query {
(where: {something_eq: "xyz", somethingElse_in: [0-10]})
}