# Graphql schema direction value through API

**URL:** <https://community.neo4j.com/t/graphql-schema-direction-value-through-api/40304>\
**Category:** GraphQL & GRANDstack\
**Created:** [June 23, 2021, 8:14pm UTC](https://community.neo4j.com/t/graphql-schema-direction-value-through-api/40304 "2021-06-23T20:14:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravianandjec](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ravianandjec/32/3859_2.png) [@ravianandjec](https://community.neo4j.com/u/ravianandjec)\
**Post date:** [June 23, 2021, 8:14pm UTC](https://community.neo4j.com/t/graphql-schema-direction-value-through-api/40304/1 "2021-06-23T20:14:25Z")

</div>

We are trying to create GraphQL API to connect neo4j Database  
in which we are trying to connect other schema Type in base node schema type as below

CUSTOMER\_REL: [Customer\_Base] @relation(name: "CUSTOMER\_PHONE", **direction: IN)**

**Is there any way i can retrieve value of direction (it can either IN or OUT) from Graphql API**

---

<div class="post-metadata">

**Author:** ![lyonwj](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lyonwj/32/27358_2.png) [@lyonwj](https://community.neo4j.com/u/lyonwj)\
**Post date:** [June 24, 2021, 12:48am UTC](https://community.neo4j.com/t/graphql-schema-direction-value-through-api/40304/2 "2021-06-24T00:48:44Z")

</div>

GraphQL schema directives (where this information is encoded in the GraphQL schema) are not currently exposed via GraphQL introspection (see [this issue](https://github.com/graphql/graphql-spec/issues/300)) so I don't see a way to retrieve this information via the GraphQL API - you'd need to have access to the SDL to inspect the directive argument values.

Alternatively, you could access this information by querying Neo4j using the [`apoc.meta.schema()` procedure](https://neo4j.com/labs/apoc/4.1/overview/apoc.meta/apoc.meta.schema/).

---

<div class="post-metadata">

**Author:** ![ravianandjec](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ravianandjec/32/3859_2.png) [@ravianandjec](https://community.neo4j.com/u/ravianandjec)\
**Post date:** [June 24, 2021, 6:19pm UTC](https://community.neo4j.com/t/graphql-schema-direction-value-through-api/40304/3 "2021-06-24T18:19:40Z")

</div>

Thanks for clarification. running apoc.meta.schema Cypher take some time for execution. so its not a good idea to execute from UI side

I try to create new property in schema but i also need to pass Cypher query to connect it.

count: Int  
@cypher(  
statement: """  
MATCH (n:Customer) RETURN count(\*)  
"""  
)

**is there any way i can create new property (direction) in Schema Type to pass static value IN or OUT (means it not need to go to neo4j database to fetch value , it can take from Schema )**

direction: String  
IN
