graphcraft icon indicating copy to clipboard operation
graphcraft copied to clipboard

`belongsToMany` associations have undefined output type

Open tapvt opened this issue 1 year ago • 10 comments
trafficstars

I've run into an issue regarding belongsToMany relationships. It seems that a type is not generated when there is a join table. This is causing graphcraft to not function using graphql and graphql-http (specifically the express library).

For example:

This is the error: The type of Workorder.WorkorderParts must be Output Type but got: undefined.

We have a Workorder model, a Parts model and a join table, WorkorderParts.

Can anyone provide any guidance as to why this is happening? Is this a known issue or am I just doing something incorrectly?

Thanks in advance.

tapvt avatar Jan 25 '24 20:01 tapvt