-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
Description
Description
Empty type definitions that don't have any directive applications or fields won't contain any origins in the struct. This affects the correctness of iter_origins() methods.
Example
type T
extend type T {
field: Int
}The iter_origins() methods only returns an extension origin, not the definition origin.
Possible solutions
I filed a possible fix PR (#1009), which is a breaking change.
It appears that any fix would be a breaking change and we may consider a larger re-design for 2.0.
- The PR proposed to add a new
definition_originfield to schema definition and various type structs. - Another suggestion was to use the
Componenttype everywhere, replacing theNodetype. Also, this overlaps with compiler: two separate DirectiveList types are inconvenient #851 (about unifyingDirectiveList<Node<...>>andDirectiveList<Component<...>>.