I am using neo4j-graphql-js library to auto generate resolvers from the schema. For a node in the schema(Employee) i need to get a particular node property(empid) from a rest call as we plan to remove that property from our neo4j database due to privacy issues. I am trying to write a custom resolver for that field . I have added @neo4j directive to that field in the schema for neo4j to ignore it. I need to make a rest call that accepts a parameter named uid and returns the corressponding empid. This iuid is a property of Employee node and so is present in my neo4j DB.
The issue is while writing the resolver the root objects only holds the filed values accesed in the query. So if iuid is not part of the query i'm unable to get it's value in the root obj.
Here is my employee node: -
Here is my resolver where for my i am returning a dummy string instead of making a rest call: -
Here is my query: -
Employee(first : 10)
I want to access all the value of all the field of the employee node so i can get the iuid. I don't know even if it is possible and if not is there any workaround this?
Your employee node is going to need some kind of uuid to be accessed. If you're looking for way to make a slug or some kind of identifier that doesn't expose your information then you'll have to figure out a way to do that and keep it anonymous outside of excluding it.
My question is that what i was trying to do is possible or not? The employee details needs to come from other DB but for that i need the iuid of the current employee node that is being queried even though iuid will not be a part of the query. If not possible then is there any other way to hide/protect these employee details in my neo4j database?
Here is a part of my Employee node type defined in schema:-
Since I can't edit the post here is the question with more details:-
It's possible if you salt the information and store it that way in the Neo4j instance. Otherwise I'd say no.
Sorry but I did not get what you meant by salt the information.