[Improvement]: Need to Access the Included Types of a Given Type #43151
Labels
Team/jBallerina
All the issues related to BIR, JVM backend code generation and runtime
Type/Improvement
Description
We need a way to access the types of a given module to find the included types of a particular type.
Describe your problem(s)
In Ballerina GraphQL package, we have a requirement to find the GraphQL interfaces and the types that implement those interfaces. Consider the following code:
When the above GraphQL service is created, we iterate the service to find the types defined in the GraphQL service. In this case, we find the
Profile
type. When theProfile
type is an object type, we need a way to find the other types that included theProfile
type; in this case theStudent
andTeacher
types.Describe your solution(s)
It would be great if we have an API from the runtime where we can retrieve all the types that are accessible from the current module, and then find the included types from those types.
In GraphQL's case, we do have the type names from the compile-time, so if we can access this information by providing the type name would be sufficient.
Related area
-> Runtime
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: