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
{{ message }}
This repository was archived by the owner on Jun 14, 2026. It is now read-only.
Error: relation type "HasManyRelation" is not supported
at SchemaBuilder._relationField (/.../node_modules/objection-graphql/lib/SchemaBuilder.js:243:11)
Looking at the code in the _relationField method it seems that HasManyRelationshould be supported.
Not 100% sure why this is happening, but it might be related to the fact that I have all my models defined in a separate NPM package so the instanceof objection.HasManyRelation check isn't referring to the same instance of objection that the models were built with?
I have two models (
OrderandOrderItems) whereOrderhasrelationMappingsdefined as follows:When I use the GraphQL Builder, as follows:
I get the following error:
Looking at the code in the
_relationFieldmethod it seems thatHasManyRelationshould be supported.Not 100% sure why this is happening, but it might be related to the fact that I have all my models defined in a separate NPM package so the
instanceof objection.HasManyRelationcheck isn't referring to the same instance ofobjectionthat the models were built with?