Custom resolvers don't work if no node with GraphQL type as Label exists
Example:
Given the following Graphql schema
type Thing {
"A property"
foo: String @customResolver
}
And custom resolver
export const resolvers = {
Thing: {
foo: () => { return "bar"}
}
}
The query
query Query {
things {
foo
}
}
will return
{
"data": {
"things": [
{
"foo": []
}
]
}
}
instead of
{
"data": {
"things": [
{
"foo": "bar"
}
]
}
}
Until a node Thing
is added to the neo4j graph (with MERGE (n:Thing) RETURN n;
)