I have a list of queries/mutations/subscriptions that I wrote little bit ago and now I can't remember how GraphQL works.
All I'm trying to do is return a String that says "Hello".
typedef
type Hello {
message: String
}
type Query {
hello: Hello
}
resolver
const resolvers = {
Query: {
hello: () => 'Hello, world!'
}
}
When I go to make a query in the GraphiQL visualizer with
{
hello {
message
}
}
I get back
{
"data": {
"hello": {
"message": null
}
}
}
Just in case it makes a difference I am using apollo-server-express
.