# Can't access node as one object property in GraphQL using @cypher directive

**URL:** <https://community.neo4j.com/t/cant-access-node-as-one-object-property-in-graphql-using-cypher-directive/27619>\
**Category:** GraphQL & GRANDstack\
**Tags:** grandstack\
**Created:** [October 21, 2020, 4:49pm UTC](https://community.neo4j.com/t/cant-access-node-as-one-object-property-in-graphql-using-cypher-directive/27619 "2020-10-21T16:49:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![costa\_fernando](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/costa_fernando/32/14061_2.png) [@costa\_fernando](https://community.neo4j.com/u/costa_fernando)\
**Post date:** [October 21, 2020, 4:49pm UTC](https://community.neo4j.com/t/cant-access-node-as-one-object-property-in-graphql-using-cypher-directive/27619/1 "2020-10-21T16:49:56Z")

</div>

Hi,

I'm trying to return an entire node as one of the properties of a type using custom directive [@cypher](https://github.com/cypher) available in the neo4j-graphql-js package, but I get this error in GraphQL Playground in the browser, when I try to access a property of this node:

`Variable ` undefined `not defined (line 5, column 128 (offset: 404))\n\"return {ability: ability, grade: grade}\", {this: student, cypherParams: $cypherParams}, true) | student_abilitiesPerformances {undefined}] } AS` student `\"\n`

This is the code in the back-end:  
[![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/9/96f63d9d00b2560833a0b5c07021b32051ba70a4.png)](https://user-images.githubusercontent.com/17749414/96751551-b871e100-13a3-11eb-8562-1388d886a186.png)

This is the GraphQL query I'm trying to make:  
[![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/2X/7/7ec4c642d036e05ce37104dc1a69079a70d8d0eb.png)](https://user-images.githubusercontent.com/17749414/96751594-c4f63980-13a3-11eb-9094-1530dd2d411f.png)

What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![costa\_fernando](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/costa_fernando/32/14061_2.png) [@costa\_fernando](https://community.neo4j.com/u/costa_fernando)\
**Post date:** [October 22, 2020, 7:09pm UTC](https://community.neo4j.com/t/cant-access-node-as-one-object-property-in-graphql-using-cypher-directive/27619/2 "2020-10-22T19:09:47Z")

</div>

It seems like a bug in neo4j-graphql.js. Is being addressed here to anyone interested: [Can't access node as one object property in GraphQL using @cypher directive · Issue #528 · neo4j-graphql/neo4j-graphql-js · GitHub](https://github.com/neo4j-graphql/neo4j-graphql-js/issues/528).
