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
Currently, the Ballerina GraphQL module supports resource functions that return dynamic service objects. But as per the discussion with James, we should not support this. Instead, we should support typed services only.
For example, the following should not be allowed:
importballerina/graphql;
service graphql:Service onnew graphql:Listener(9090) {
resourcefunction get profile() returnsserviceobject {} {
returnnewserviceobject {
resourcefunction get name() returnsstring {
return"Sherlock";
}
}
}
}
Instead, when a user needs to return service from a resource function, they should define a service type.
The text was updated successfully, but these errors were encountered:
Currently, the Ballerina GraphQL module supports resource functions that return dynamic service objects. But as per the discussion with James, we should not support this. Instead, we should support typed services only.
For example, the following should not be allowed:
Instead, when a user needs to return service from a resource function, they should define a service type.
The text was updated successfully, but these errors were encountered: