Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL Compiler Plugin Allows Resource Functions to Return 'any' Type #1622

Closed
DimuthuMadushan opened this issue Jul 8, 2021 · 0 comments · Fixed by ballerina-platform/module-ballerina-graphql#329
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Points/1 Priority/High Team/PCM Protocol connector packages related issues Type/Bug

Comments

@DimuthuMadushan
Copy link

Description:
The following GraphQL service should be invalidated and throw a compilation error:

import ballerina/graphql;
 
service /graphql on new graphql:Listener(9000) {

   isolated resource function get age() returns any {
       return 3;
   }
}

Currently this does compile and results in a runtime error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/graphql Issues related to Ballerina GraphQL module Points/1 Priority/High Team/PCM Protocol connector packages related issues Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants