cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

ilyafish
Node Link

I am using the latest version of grand stack API (with new neo4j-graphql library) as backend only. Front end is next js using firebase auth.

The goal is to use neo4j as the database, firebase for user management/authentication.

I’m hitting a roadblock figuring out how to pass parameters from custom logic into the cypher code on a mutation resolver.

Ultimately what I want to do is have a user node that corresponds to the jwt parameters from firebase.

Right now the firebase jwt is passed into the context. The resolver grabs it from context and uses jsonwebtoken to verify it. Here is where I’m stuck. Once verified I can’t figure out how to pass the parameters to cypher.

What is the proper way/syntax to pass variables into cypher that are generated inside the mutation?

And is this the best way to do it or should I instead take care of verifying the jwt inside Apollo

Comments
jggomez
Graph Voyager

Hi, is better to save the UID (User ID) in the node. You can get it, using the firebase JS library

https://firebase.google.com/docs/auth/web/manage-users#get_a_users_profile

Thanks

Version history
Last update:
‎05-09-2021 04:36 PM
Updated by:
Contributors