$ yarn$ node index.jshttp://localhost:3000/graphql — Graphiql UI
{
videos {
totalCount
}
}
{
videos(first:1) {
edges {
node {
id
}
}
}
}
{
videos(last:1) {
edges {
node {
id
}
}
}
}
{
videos {
edges {
node {
title,
duration,
released,
id
}
}
}
}
mutation addVideoQuery($input: AddVideoInput!) {
createVideo(input: $input) {
video {
title
}
}
}
/* Query Variables */
{
"input": {
"title": "Teenage Mutant Ninja Video",
"duration": 400,
"released": true,
"clientMutationId": "ldrm"
}
}