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

Ballerina GraphQL mutation won't properly invoke when Enum is used as a parameter of the input object #4015

Closed
shayanmalinda opened this issue Jan 30, 2023 · 2 comments
Labels
module/graphql Issues related to Ballerina GraphQL module Reason/Invalid Issue is invalid. Type/Bug

Comments

@shayanmalinda
Copy link

shayanmalinda commented Jan 30, 2023

Description:
When GraphQL mutation has a record type which contains an Enum attribute, that endpoint will not be invoked properly. It will indefinetely try to invoke the endpoint.

Steps to reproduce:

GraphQL endpoint Definition

remote function createUser(types:UserInput input) returns User|error {
    log:printInfo("Test log");
    ...
}

Record type definition of the UserInput

public type UserInput record {|
    ...
    UserType userType;
|};

Definition of the UserType enum

public enum UserType {
    OWN_CONTACT = "OWN CONTACT",
    PARTNER_CONTACT = "PARTNER CONTACT"
}

"Test log" won't logged out in above case.
Above issue won't occur when userType is defined as string userType.

Affected Versions:

2201.3.2

Suggested Assignees (optional):

@ThisaruGuruge

@shayanmalinda shayanmalinda changed the title Ballerina GraphQL mutation won't invoke when Enum is used as an a parameter of an input object Ballerina GraphQL mutation won't properly invoke when Enum is used as an a parameter of an input object Jan 30, 2023
@shayanmalinda shayanmalinda changed the title Ballerina GraphQL mutation won't properly invoke when Enum is used as an a parameter of an input object Ballerina GraphQL mutation won't properly invoke when Enum is used as an a parameter of the input object Jan 30, 2023
@shayanmalinda shayanmalinda changed the title Ballerina GraphQL mutation won't properly invoke when Enum is used as an a parameter of the input object Ballerina GraphQL mutation won't properly invoke when Enum is used as a parameter of the input object Jan 30, 2023
@niveathika niveathika added the module/graphql Issues related to Ballerina GraphQL module label Jan 31, 2023
@ThisaruGuruge
Copy link
Member

This is a known bug due to a Ballerina runtime API limitation. This has been fixed now and will be available with GraphQL 1.6.0 release (which will be released with Ballerina 2201.4.0: SwanLake Update 4).

Related: #3721

@ThisaruGuruge ThisaruGuruge added the Reason/Invalid Issue is invalid. label Feb 2, 2023
@github-actions
Copy link

github-actions bot commented Feb 2, 2023

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

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 Reason/Invalid Issue is invalid. Type/Bug
Projects
None yet
Development

No branches or pull requests

3 participants