-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Version/Branch | 1.0.0 |
It could be great to auto-discover a GraphQL Type Unions & Interfaces with annotations.
For a given PHP class we could loop through parents & interfaces.
If one of this parents or interfaces is a GraphQL Interface or Union itself :
- If it's an interface, the interface is added to the GraphQL type
- If it's an union, the GraphQL type is added to the union
On @GQL\Type
, we could had a autodiscoverInterfaces
option (true by default) and the auto-discovery would only apply if the interfaces
option is not already set.
On @GQL\Union
, we could had a autodiscoverTypes
option (true by default) and the auto-discovery would only apply if the types
option is not already set.