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

Empty Input Arrays not Considered as Valid Inputs #3076

Closed
ThisaruGuruge opened this issue Jul 5, 2022 · 1 comment · Fixed by ballerina-platform/module-ballerina-graphql#801
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/PCM Protocol connector packages related issues Type/Bug

Comments

@ThisaruGuruge
Copy link
Member

Description:

Consider the following code:

import ballerina/graphql;

service on new graphql:Listener(4000) {
    resource function get names(string[] input) returns string[] {
        return input;
    }
}

The following should be a valid query:

{
  names(input: [])
}

But it returns the following error:

{
    "errors": [
      {
        "message": "[String!]! cannot represent non [String!]! value: []",
        "locations": [
          {
            "line": 2,
            "column": 17
          }
        ]
      }
    ]
}
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

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/EngineeringMistake The issue occurred due to a mistake made in the past. Team/PCM Protocol connector packages related issues Type/Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants