Hello,
I'm trying out GraphQL. I can use the generated resolvers using Neo4j 3.15 without any issues. I'm now trying to create a custom resolver field based on this article Neo4j GraphQL Library - Neo4j GraphQL Library
I defined the resolver as below in the graphql-schema.js file:
export const resolvers = {
Test_User: {
fullDescription(object, params, ctx, resolveInfo) {
return ${object.description1} - ${object.description2}
;
}
}
};
and the type as follow in the schema.graphql. 'fullDescription' is a new resolver field not defined in Neo4j
type Test_User {
id: ID!
name: String
description1: String
description2: String
fullDescription: String
}
The query returns 'undefined' for the object parameter:
{
"data": {
"Test_User": [
{
"fullDescription": "undefined - undefined"
}
]
}
}
What am I doing wrong?
Thanks