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
Doctrine 2 has a great feature named as Embeddable classes.
I try to use it in the pair with graphql-doctrine and got error No type registered with key Position. Either correct the usage, or register it in your custom types container when instantiating GraphQL\Doctrine\Types, where Position is a simple object
I was not aware of the Embeddable feature. That sounds like it could be quite useful for some our use-cases as well, (storing money with value and currency, or time and timezone). While I do not have plan to implement it right now, it could be implemented some day if we end up using it.
In the meantime, I assume you could workaround the limitation by implementing a custom GraphQL type and declaring it when creating an instance of Types.
As I don't have experience working with Embeddable I cannot give good advice on how to implement it properly. Maybe the workaround is enough ? Maybe there could be a way to automate it in a similar way that we do for entities ?
Implementing a custom GraphQL type require much manual work which is redundant when there are many Embeddable entities that's why I discarded from it, but automation is the exactly what many will expect.
Doctrine 2 has a great feature named as Embeddable classes.
I try to use it in the pair with
graphql-doctrine
and got errorNo type registered with key Position. Either correct the usage, or register it in your custom types container when instantiating GraphQL\Doctrine\Types
, wherePosition
is a simple objectand
RankMonitor
modelDo you plan to add native support for
Embeddable
classes or maybe can explain how to implement this feature?The text was updated successfully, but these errors were encountered: