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

Returning Incorrect Values for GraphQL Introspection Queries #1377

Closed
DimuthuMadushan opened this issue May 18, 2021 · 3 comments
Closed

Returning Incorrect Values for GraphQL Introspection Queries #1377

DimuthuMadushan opened this issue May 18, 2021 · 3 comments
Labels
module/graphql Issues related to Ballerina GraphQL module Status/Blocked Issues that are currently blocked. Team/PCM Protocol connector packages related issues Type/Task

Comments

@DimuthuMadushan
Copy link

Description:

  1. Return incorrect values as the default values of resource function parameters.
  2. Parameter type name is NULL when parameter type kind is NON_NULL.
@ThisaruGuruge
Copy link
Member

Description:

  1. Return incorrect values as the default values of resource function parameters.

Related to ballerina-platform/ballerina-lang#30106

  1. Parameter type name is NULL when parameter type kind is NON_NULL.

This is the expected behavior.

@ThisaruGuruge
Copy link
Member

The returning of the incorrect values for default values is actually a design limitation. We do not have a way to get the default value of an input parameter at the runtime. This is known at the time of implementation and as a temporary workaround, we used zeroValue of the input type as the default value, if an input parameter has a default value.

This does not affect the execution, since at the execution phase, since the default value is used from the runtime when we execute the function. The issue is the default value shown in the introspection queries is wrong.

Until the related lang issue (ballerina-platform/ballerina-lang#30106) is fixed, this cannot be done. Therefore, removing the Bug label, and adding Task label.

@ThisaruGuruge
Copy link
Member

Closing as the remaining issue is tracked using #4720

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 Status/Blocked Issues that are currently blocked. Team/PCM Protocol connector packages related issues Type/Task
Projects
Archived in project
Development

No branches or pull requests

2 participants