Skip to main content

No query string was present - GraphQL & C# - PostRequest

  • April 29, 2021
  • 3 replies
  • 2069 views

mohamed.saleh

Hi,
I have been struggling with fetching the data from monday.com using GraphQL, C#, PostRequest.
I have been getting 'No query string was present ’ but the account number is fetched correctly.
I’m new to Monday.com and currently working on new Feature to integrate Monday with our product.

the returned json object.
{“errors”:[{“message”:“No query string was present”}],“account_id”:XXX}

I hope someone can help with this Issue or guide me.
I’m using https NOT http

Thanks

public async Task GetBoardItems([FromQuery] long boardId)
{
string query = @“query {
    boards(ids: boardID){
    items {
        id
        name
        created_at
        creator_id
        column_values {
            id
            title
            value
            text
            }
        updates{
            item_id
            text_body
            created_at
            updated_at
        }
      }
    }
}”;

        query = query.Replace("boardID", boardId.ToString());

        var json = new JavaScriptSerializer().Serialize(query);
        var content = new StringContent(json, Encoding.UTF8, "application/json");
        var responseFromServer = await client.PostAsync(url, content);
        var contents = await responseFromServer.Content.ReadAsStringAsync();
        var boardItems = JsonConvert.DeserializeObject<Root>(contents);
        return boardItems;
    }
This topic has been closed for replies.

3 replies

Forum|alt.badge.img
  • monday.com Team Member
  • May 19, 2021

Hi @mohamed.saleh,

Apologies for the delay in response! I think you may have posted your query in the wrong section (for all apps and API related queries we have our “monday Apps & Developers” section in our community).

I know it’s been a while so I just wanted to check in and see if you were still running into an issue?

Let us know!


mohamed.saleh
  • Author
  • New Participant
  • May 24, 2021

I have resolve the issue. Thank you


  • May 31, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.