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 Allows Fields Starting with __ in the Mutation Type #2800

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

Comments

@ThisaruGuruge
Copy link
Member

Description:

If a GraphQL service has a field inside the Mutation type starting with double underscores (__), the compiler allows using the name. This should throw a compiler error.

Reproducible code:

import ballerina/graphql;

service on new graphql:Listener(9000) {
    resource function get greeting() returns string {
        return "Hello";
    }

    remote function __schema() returns string {
        return "Hello";
    }
}
@github-actions
Copy link

github-actions bot commented May 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.

@ThisaruGuruge ThisaruGuruge added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label May 6, 2022
@ThisaruGuruge ThisaruGuruge added this to the 2201.1.0 milestone May 24, 2022
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/0.5 Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/PCM Protocol connector packages related issues Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant