Using 99design Gqlgen library to have a schema and code generation. Followed offical getting started guide.
- Playground working with query against Todos.
- Create a new Todo using mutation.
- Get realtime subscription that sends timestamps using websockets per second.
Just follow simple subscription torial
query findTodos {
todos {
id
text
done
user {
id
name
}
}
}
mutation createTodo {
createTodo(input: { text: "haleem", userId: "1234293923423423" }) {
user {
id
}
text
done
}
}
subscription realTime{
currentTime {
unixTime
timeStamp
}
}