Hi, I am working with parts of the GRANDStack starter project (but changing it a bit for my own project). An issue is that I only get an empty array out of the following query and data:
GraphQL:
query { Company
{
name
person {
firstName
And the schema looks like this:
type Person {
id: ID!
name: String
firstName:String
lastName:String
company: Company @relation(name:"position", direction:IN)
}
type Company {
id: ID!
name: String
person: [Person] @relation(name:"position", direction:IN)
}
I am using CSV data from Linkedin so the results we are getting from the GraphQL query above looks like this:
@MuddyBootsCode is correct about the need to use position in the query.
Also make one of the IN relations an OUT since they’re supposed to complement each other. And perhaps try to constrain your nodes more, for example making [People] into [People!]!. I’d actually do the same with Company.