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 listening to the EVENT_DEFINE_GQL_TYPE_FIELDS event in order to modify field definitions for a specific GraphQL type the GqlEntityRegistry is not guaranteed to contain the desired type (if we wish to use a circular type reference, it will never be), meaning we will not be able to define the type of the field as desired.
The text was updated successfully, but these errors were encountered:
membla
changed the title
Allow the use existing types when defining GraphQL type fields
Allow the use of existing types when defining GraphQL type fields
Jul 22, 2021
@membla I got it working locally for entry types by shifting the event trigger point to when the fields are actually resolved, as opposed to the type being created.
However, this change has to occur in the type generators, which means that plugins would need to adjust their code as well. Further, this changes the point in time when the event is fired, which also makes it a backward-compatiblity sensitive change.
This means that fixing this will have to wait until Craft 4.0
Description
When listening to the
EVENT_DEFINE_GQL_TYPE_FIELDS
event in order to modify field definitions for a specific GraphQL type theGqlEntityRegistry
is not guaranteed to contain the desired type (if we wish to use a circular type reference, it will never be), meaning we will not be able to define the type of the field as desired.The text was updated successfully, but these errors were encountered: