Retrieving many to many relationship with additional Fields. #2246
-
Hey just have you came across situation that you have many to many relationship with additonal fields? This is my schema:
this is my nexus:
I can add t.model.medicineActiveSubstances (to activeSubstances) and t.model.medicineActiveSubstances (to medicines). But this causes an error when I try to add type to it: How do I retrieve medicine with all ActiveSubstances on it and amountOfActiveSubstance?? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
"ERROR: No subset types are available. Please make sure that one of your GraphQL type is a subset of your t.model('')", - This error appears because you name in Nexus model does not match prisma model. As soon as i matched them it works fine. |
Beta Was this translation helpful? Give feedback.
"ERROR: No subset types are available. Please make sure that one of your GraphQL type is a subset of your t.model('')", - This error appears because you name in Nexus model does not match prisma model. As soon as i matched them it works fine.
I hope this will help others that will come across this issue!