Query links
query {
links {
id
description
url
}
}
Query Users
query {
users {
id
username
password
}
}
Query Votes
query {
votes {
id
user {
id
username
}
link {
id
url
}
}
}
Query with filter
query {
links(search: "schlpbch") {
id
description
url
}
}
Create link:
mutation {
createLink(
url: "https://github.com",
description: "Where the world builds software"
) {
id
description
url
}
}
mutation {
createLink(
url: "https://github.com/schlpbch",
description: "Schlpbch's GitHub"
) {
id
description
url
postedBy {
id
username
email
}
}
}
Create user:
mutation {
createUser(
username: "schlpbch",
email: "[email protected]",
password: "424242"
) {
user {
id
username
email
}
}
}
Create Vote
mutation {
createVote(linkId: 1) {
user {
id
username
email
}
link {
id
description
url
}
}
}