You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to create the resolvers for this (i use prisma as datasource and codegen for type generation) i always get type error because User needs the field posts to be present and also Post need the field user, and this causes a circular dependency i can not handle.
Questions regarding how to use GraphQL
given this schema :
when i try to create the resolvers for this (i use prisma as datasource and codegen for type generation) i always get type error because
User
needs the fieldposts
to be present and alsoPost
need the fielduser
, and this causes a circular dependency i can not handle.my resolver looks something like this :
the only workaround that seems to work is to make those relations (
user
&posts
) optional (remove ! from the end), which does not serve my purpose.PS: its only a type error and the code is actually working fine.
The text was updated successfully, but these errors were encountered: