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

Escape character causes issues e.g. string 'type #3067

Closed
shafreenAnfar opened this issue Jul 4, 2022 · 0 comments · Fixed by ballerina-platform/module-ballerina-graphql#823
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Points/1 Reason/Regression The issue has introduced a regression. Team/PCM Protocol connector packages related issues Type/Bug

Comments

@shafreenAnfar
Copy link
Contributor

consider the below program

import ballerina/graphql;

type DynamicFilterCriteria record {
    string accountClassification;
    string recordType;
    string region;
};

type OpportunityData record {
    // string? Entry_Vector__c;
    Account account;
    string id;
};

type LeadData record {
    string Id;
    // string? Question_Comment__c;
};

type Account record {
    Attributes attributes;
    string Name;
};

type YtdFilterCriteria record {
    Region region;
    string dateFrom;
    string dateTo;
};

type Attributes record {
        string 'type;
        string url;
    };

type BantFilterCriteria record {
    *YtdFilterCriteria;
    BantType bantType;
    WonType wonType;
};

type ChannelFilterCriteria record {
    string PSSupportStartDate;
    string PSSupportEndDate;
    Region region;
};

type SQLFilterCriteria record {
    boolean iam;
    Region region;
};

public enum BantType {
    Direct,
    Channel
}

public enum WonType {
    Closed,
    Open
}

public enum Region {
    NA = "NA",
    APAC = "APAC", 
    MEA = "MEA",
    ANZ = "ANZ",
    EU1 = "EU 1",
    EU2 = "EU 2",
    EU3 = "EU 3"
}

service /graphql on new graphql:Listener(9000) {
    resource function get opportunity/bant(BantFilterCriteria bantFilterCriteria) returns OpportunityData[]|error {
        return error("");
    }

    resource function get opportunity/ytd(YtdFilterCriteria ytdFilterCriteria) returns OpportunityData[]|error {
        return error("");
    }

    resource function get opportunity/channel(ChannelFilterCriteria channelFilterCriteria) returns OpportunityData[]|error {
        return error("");
    }
}

This produces something as follows,

Screen Shot 2022-07-04 at 7 30 05 PM

I am not sure if that is the right thing to do.
@shafreenAnfar shafreenAnfar added Type/Bug module/graphql Issues related to Ballerina GraphQL module Team/PCM Protocol connector packages related issues labels Jul 4, 2022
@ThisaruGuruge ThisaruGuruge added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jul 4, 2022
@ThisaruGuruge ThisaruGuruge self-assigned this Jul 18, 2022
@ThisaruGuruge ThisaruGuruge added Reason/Regression The issue has introduced a regression. and removed Reason/EngineeringMistake The issue occurred due to a mistake made in the past. labels Jul 18, 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/1 Reason/Regression The issue has introduced a regression. 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