I have 2 nodes in Neo4J database(Actor,Movie) and both nodes connected with relationship (ACTED_IN with some property example amount).
I want to get relationship data between two nodes using graphQl hot chocolate in C#.
I found the solution to get data from two nodes using
Git Hub link. I am using code first approach.
Not able to find any solution to get relationship data through graphQL hot chocolate.
Please let me know if any more details require from my end.
public class Actor
{
public string Name { get; set; }
[Neo4JRelationship("ACTED_IN")]<br/>
public List<Movie> ActedIn { get; set; }<br/>
}<br/>
public class Movie
{
public string Title { get; set; }
[Neo4JRelationship("ACTED_IN", RelationshipDirection.Incoming)]<br/>
public List<Actor> Actors { get; set; }<br/>
}<br/>
=========== GraphQl Query=========
query
{
actors
{
name,
movies
{
title
}
}
}
and i am expecting something like
query
{
actors
{
name,
ACTED_IN
{
amount,
movies
{
title
}
}
}
}
Rajesh Bhatt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.