# Is there a way to generate an ID! field value for nodes that existed before a GraphQL schema was created?

**URL:** <https://community.neo4j.com/t/is-there-a-way-to-generate-an-id-field-value-for-nodes-that-existed-before-a-graphql-schema-was-created/13053>\
**Category:** GraphQL & GRANDstack\
**Created:** [December 21, 2019, 4:47am UTC](https://community.neo4j.com/t/is-there-a-way-to-generate-an-id-field-value-for-nodes-that-existed-before-a-graphql-schema-was-created/13053 "2019-12-21T04:47:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![malik](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/malik/32/5355_2.png) [@malik](https://community.neo4j.com/u/malik)\
**Post date:** [December 21, 2019, 4:47am UTC](https://community.neo4j.com/t/is-there-a-way-to-generate-an-id-field-value-for-nodes-that-existed-before-a-graphql-schema-was-created/13053/1 "2019-12-21T04:47:16Z")

</div>

I'm currently writing a GraphQL endpoint that'll be querying my Neo4j 4.0.0 Community instance.

I'd like to have a new uuid field of type ID! for nodes that existed before and thus do have values in \_id but don't yet have nodeTypeNameId attribute.

How do I generate a unique ID for these new fields in bulk so they can become usable through GraphQL?

By the way, I'm usinig Apollo Server and neo4j-graphql-js for my implementation.

---

<div class="post-metadata">

**Author:** ![MuddyBootsCode](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/muddybootscode/32/10330_2.png) [@MuddyBootsCode](https://community.neo4j.com/u/MuddyBootsCode)\
**Post date:** [December 21, 2019, 11:40am UTC](https://community.neo4j.com/t/is-there-a-way-to-generate-an-id-field-value-for-nodes-that-existed-before-a-graphql-schema-was-created/13053/2 "2019-12-21T11:40:31Z")

</div>

You can simply add a uuid to existing nodes by running:

```auto
match(n) set n.id = randomUUID()

```

then you can do the same on your front end.
