ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

[Bug]: error when using readonly graphql input #7261

Open SasinduDilshara opened 1 month ago

SasinduDilshara commented 1 month ago

What happened?

I defined a graphql input with a read-only field.

public type StatementInput record {|

    string entityNo;

    account:Period[] & readonly periods;

|};

isolated resource function get statement(graphql:Context ctx, StatementInput[] input) returns Statement[]|error {

If I send a request to this gql service by separating document and variables, the service exits with the following error trace.

error: error while mapping 'periodStartDate': {ballerina/lang.map}InvalidUpdate