I am beginning to use Monday API through C#. I am using Monday Client
Here is a sample code which gives a weird error when trying to load details of specific dashboard.
var dashboardId = <lngid>;
MondayClient client = new MondayClient("MyAuthKey");
var b = client.GetBoards().GetAwaiter().GetResult();
foreach (var item in b)
{
if (item.Id == dashboardId)
{
var thisBoard = client.GetBoard(item.Id).GetAwaiter().GetResult();
Console.WriteLine(thisBoard.Name);
}
}
And the error is as below:
Unhandled exception. System.Exception: Type mismatch on variable $id and argument ids ([Int]! / [ID!])
at Monday.Client.MondayClient.ThrowResponseErrors(GraphQLError graphQlErrors) in C:\LavanyaDeepak\projects\monday.client.v2-master\Monday.Client\MondayClient.cs:line 47
at Monday.Client.MondayClient.GetBoard(Int64 boardId) in C:\LavanyaDeepak\projects\monday.client.v2-master\Monday.Client\MondayClient.cs:line 154
at MondayConsumer.Main(String args) in C:\LavanyaDeepak\projects\monday.client.v2-master\Monday.Consumer\Program.cs:line 18
C:\LavanyaDeepak\projects\monday.client.v2-master\Monday.Consumer\bin\Debug\net6.0\Monday.Consumer.exe (process 16704) exited with code -532462766.
Welcome to the community. The error is generated in the function GetBoard and shows that you are sending the boardId in the wrong type. The API expect the boardId of being type ID! and you are apparently sending it as type Int64.