# @neo4j/graphql vs neo4j-graphql-js

**URL:** <https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855>\
**Category:** GraphQL & GRANDstack\
**Tags:** graphql, grandstack\
**Created:** [May 5, 2021, 9:27am UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855 "2021-05-05T09:27:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ainsausti](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ainsausti/32/887_2.png) [@ainsausti](https://community.neo4j.com/u/ainsausti)\
**Post date:** [May 5, 2021, 9:27am UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/1 "2021-05-05T09:27:37Z")

</div>

Hi,

I've recently read this post of the maintainer of neo4j-graphql-js in github: [The future of this library · Issue #608 · neo4j-graphql/neo4j-graphql-js · GitHub](https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608)

As he says, the library will no longer be maintained officially by Neo4j and he mentions [@neo4j/graphql](https://www.npmjs.com/package/@neo4j/graphql) as the replacement. Does this library has the same features as the other one or it has a totally different purpose? Will it be officially maintained long-term or it's just a proof of concept?

We need to know how stable it is and if it will cover the functionality proposed by neo4j-graphql-js because one of our system depends on it and we must make a decision as soon as possible.

Thank you in advance.

---

<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:** [May 5, 2021, 10:10am UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/2 "2021-05-05T10:10:35Z")

</div>

The new library @neo4j/graphql is going to be the officially supported library in the future. It has a number of different features than the old library but maintains the core functionality of the old there's a migration guide here [Migration Guide - Neo4j GraphQL Library](https://neo4j.com/docs/graphql-manual/current/guides/migration-guide/) that can help you get started.

---

<div class="post-metadata">

**Author:** ![jaedag](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jaedag/32/12923_2.png) [@jaedag](https://community.neo4j.com/u/jaedag)\
**Post date:** [May 6, 2021, 1:35am UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/3 "2021-05-06T01:35:17Z")

</div>

Just to add to @MuddyBootsCode's post, I would mention that the new `@neo4j/graphql` library doesn't have support for properties on relations yet. The maintainer of the library says that it will be released in the near future.

So I would say that if your code depends on relationship properties at all, then you should probably hold on till that feature is incorporated in the new library. Otherwise you are safe to upgrade.

---

<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:** [May 7, 2021, 8:18pm UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/4 "2021-05-07T20:18:20Z")

</div>

The [`@neo4j/graphql` library](https://neo4j.com/docs/graphql-manual/current/) is the official open-source Neo4j GraphQL Library and will be maintained and supported on an ongoing basis with a dedicated engineering team. Current users of `neo4j-graphql-js` should consider migrating to `@neo4j/graphql`. While the two libraries are conceptually similar there are some differences in the generated APIs and feature sets. `@neo4j/graphql` also introduces additional features such as a more powerful authorization model, nested mutations, and an OGM. You can read more about the Neo4j GraphQL Library in [this blog post](https://neo4j.com/developer-blog/announcing-stable-release-official-neo4j-graphql-library-1-0-0/) and on the [Neo4j GraphQL Library web page.](https://neo4j.com/product/graphql-library/)

For other resources on migrating in addition to the migration guide linked above, [this blog post](https://neo4j.com/developer-blog/announcing-stable-release-official-neo4j-graphql-library-1-0-0/) goes into detail comparing features in the two libraries and we recently did a [live stream](https://www.youtube.com/watch?v=4_rp1ikvFKc) showing how to migrate a [demo podcast application](https://github.com/johnymontana/grandcast.fm) from `neo4j-graphql-js` to `@neo4j/graphql` including how the new authorization functionality can be used.

Regarding relationship properties - this is something being addressed now. The plan is to use a Relay style connection model for handling relationship properties which is more consistent with GraphQL best practices. For details, there is an [RFC here](https://github.com/neo4j/graphql/pull/193) with the current design.

If you have any other blockers to migrating please [open an issue on Github](https://github.com/neo4j/graphql/issues) as we are actively interested in ensuring users are able to migrate to the official Neo4j GraphQL Library and want to make sure these issues are identified so they can be addressed.

---

<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:** [May 7, 2021, 8:55pm UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/5 "2021-05-07T20:55:34Z")

</div>

Also, wanted to mention another resource for learning more about the Neo4j GraphQL Library, which is this online training on Graph Academy: ["Building GraphQL APIs Using The Neo4j GraphQL Library"](https://neo4j.com/graphacademy/training-graphql-apis/enrollment/)

---

<div class="post-metadata">

**Author:** ![ainsausti](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ainsausti/32/887_2.png) [@ainsausti](https://community.neo4j.com/u/ainsausti)\
**Post date:** [May 8, 2021, 7:45am UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/6 "2021-05-08T07:45:31Z")

</div>

Thanks everyone!  
We will migrate to the new library slowly because it affects to an important part of the system, thus we are using it to automatically create and deploy APIs form a model built in an application.

We will comment here our experience and problems to give you feedback.

---

<div class="post-metadata">

**Author:** ![louis.van.ackere0](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/louis.van.ackere0/32/4764_2.png) [@louis.van.ackere0](https://community.neo4j.com/u/louis.van.ackere0)\
**Post date:** [May 10, 2021, 3:18pm UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/7 "2021-05-10T15:18:07Z")

</div>

So far I am not having an issues with the new library except for one detail. For me the graphql \_id that exposes the Internal ID of nodes does not work anymore. Anyone else experiencing this?

---

<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:** [May 13, 2021, 6:26pm UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/8 "2021-05-13T18:26:39Z")

</div>

Glad to hear it's going smoothly - for the most part :-)

Exposing the Neo4j internal id to external systems is almost always not desired as those id values can be reused/reclaimed. Instead, I would suggest generating a UUID and storing that as a property on the node. The [`@id` directive](https://neo4j.com/docs/graphql-manual/current/type-definitions/autogeneration/#type-definitions-autogeneration-id) can be used to autogenerate these UUID values.

If you really want to expose the internal node id via GraphQL, this can be done with a `@cypher` directive field:

```auto
extend type Foo {
  internalNodeId: ID! @cypher(statement: "RETURN id(this)")
}

```

---

<div class="post-metadata">

**Author:** ![louis.van.ackere0](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/louis.van.ackere0/32/4764_2.png) [@louis.van.ackere0](https://community.neo4j.com/u/louis.van.ackere0)\
**Post date:** [May 13, 2021, 7:37pm UTC](https://community.neo4j.com/t/neo4j-graphql-vs-neo4j-graphql-js/37855/9 "2021-05-13T19:37:29Z")

</div>

Hi,

I've received the same advice on the discord. That query does indeed work and fix the situation. I've tried shifting to apoc.install.uuid (favoring long-term/robustness) but also had some issues there which have resulted in some code updates. Nice to see the quick bug fixes in the repository !

Thanks!
