20ECE1003 Abhiraaj
20ECE1003 Abhiraaj

Reputation: 11

type GraphQl typegoose backend error while linking models error : Error: Prop-Option "ref"'s value is "null" or "undefined" for "User.projects" [E005]

user schema

projects schema

I've been able to fix it as shown here however this doesn't seem like the right approach as Its throwing some warnings, also feels very make shift and like Its going to cause some bigger issues in future. What I want is the cause of the problem and if there is anyother way to fix this

Upvotes: 1

Views: 708

Answers (1)

hasezoey
hasezoey

Reputation: 1096

Next time you ask a question, please put the code as code blocks and not as pictures and you should also provide what package versions are used


For this error there is a documentation page, see E005.

In your case it looks like you have a "Circular Dependency" Problem, see Reference other Classes: Circular Dependencies on how to fix this.

The Documentation Page basically says: "put all model compilation (getModelForSchema / buildSchema calls) into one file"

Upvotes: 2

Related Questions