- git clone https://github.com/kevinhermawan/FlatNews-backend.git
- cd FlatNews-backend
- npm install
- npm start
An in-browser IDE for exploring GraphQL.
To access GraphiQL you can open http://localhost:5000/graphiql in your browser
query ShowLinks {
allLinks {
id
url
description
}
}
query {
allLinks(filter: {
OR: [
{url_contains: "face"},
{description_contains: "Fa"}
]
}){
url
description
}
}
query {
allLinks(first: 2, skip: 1){
url
description
}
}
mutation CreateLink {
createLink (
url: "https://facebook.com",
description: "Facebook"
) {
id
url
description
}
}
mutation CreateUser {
createUser (
name: "Kevin Hermawan",
authProvider: {
email: {
email: "kevinhermawanx@gmail.com",
password: "ytrewq123456789"
}
}
) {
id
name
}
}
mutation SignIn {
singinUser (email: {
email: "kevinhermawanx@gmail.com",
password: "ytrewq123456789"
}) {
token
user {
name
email
}
}
}
mutation CreateVote {
createVote (linkId: "59ac4fbccb316407b3f3a3ff") {
id
user{name}
link{url}
}
}
subscription {
Link(filter: {
mutation_in: [CREATED]
}) {
node {
url
description
}
}
}