Not enough information to infer relation with self-one-To-Many relation
Hello guys ! Thank for this community !
I'm looking everywhere to solve this.
Got a schema with a question which can have parent question (one parentQuestion) and many child questions (subquestions) :
When i basically Query this :
I got Error: There is not enough information to infer relation "questionSchema.subQuestions"
I can't manage to do it via query (it works with select but doesn't return me formatted data as i wish.
Does anyone have insight about it ?
Thank you !
2 Replies
Sorry my research on the discord didn't show me this thread which explains what my mistake was:
https://discord.com/channels/1043890932593987624/1173896750663213066/1173896750663213066
the mistake was that both relation names should be the same so in my schema i should have:
i was also in need of this, thanks