Cannot Create Group via GraphQL API

While exploring the GraphQL API, I have encountered a problem in making a group in a specific board:

The board query returns the board_id as an ID! , while the create_group expects the board_id as an Int! .
When I try to send my board_id as an Int! , I get a message that my library cannot coerce the number to an Int! .
When I try to send my board_id as an ID!, I get a type mismatch message between my variable (ID!) and the board_id argument (Int!).

How do I create a group in a specific board via the GraphQL API ?

Hello @RevivePhill and welcome to the community!

I hope you like it here :muscle:

GraphQL wise:
You can use a boards query:

{
  boards(limit: 5) {
    name
    id
  }
}

Which will give you the ID as a string:

      {
        "name": "My board",
        "id": "1234567890"
      }

You can then use a mutation like this one, passing the board ID that you got as a numeric value:

mutation {
  create_group(board_id: 1234567890, group_name: "My group") {
    id
    title
  }
}

Script wise when using variables:
You can take the ID you got as a string, turn it into a numeric value and pass the board ID as an Int!:
mutation ($boardId: Int!) {...}

Let me know if that helps!

If it doesn’t, please send over you script so we can take a look!

Cheers,
Matias

Hello @Matias.Monday , thank you.

What you have described is exactly what I am doing, but I did not realize the the ID is returned as a string instead of a numeric. I have made that change in my code, and the error is gone. Thank you for your guidance.

Hello @RevivePhill,

Glad to help!

Let us know if you need anything else :slightly_smiling_face:

Cheers,
Matias

Following up on this, I’m running into the same problem again. I’ve changed how I’m using the python library (building queries dynamically instead of pre-written queries with variables), and it’s once again giving me the error:

Int cannot represent non 32-bit signed integer value

I have been able to track through some reports on the library itself, as well as the GraphQL specification documents, and have found that my library is correct, and that Monday’s implementation is out of spec:

The Int scalar type represents a signed 32-bit numeric non-fractional value.

I’m going to raise a bug with my library’s maintainers as well, but I don’t think they’re going to make changes that are outside of the specification.

What is the process for requesting a change on your side to bring Monday’s API back into specification?

Hello there @RevivePhill,

In this case, I believe the issue lies in your library or script.

Our API works well with Python and we have multiple users using it regularly with this language and they are not encountering this issue.

I would advise to contact the team that maintains your library as you said and check with them what can be done, because again, it appears that the issue is not coming from monday since it would probably be an issue for all Python users if it was.

Cheers,
Matias

Hi @Matias.Monday,

while I understand that it works with some implementations that are out of spec, too, “It works for me” isn’t a good answer for producing/requiring values that aren’t in-spec.

We just ran into this too, and are now abandoning integrating monday in our workflow more fully.

For reference, we were using: GitHub - obmarg/cynic: A bring your own types GraphQL client library for Rust

Best,

Moritz

Hello @moritz,

Thank you for bringing this into our attention as @RevivePhill.

I do not know if this could be addressed anytime soon but I will share it with our team again so your feedback is taken into account :slightly_smiling_face:

Cheers,
Matias

I’ve encountered this same issue.

I’m using this query:

{
  me {
    name
  }
  boards(ids: [4531622611]) {
    name
    columns {
      title
      id
      type
    }
    groups {
      title
      id
    }
    items {
      name
      group {
        id
      }
      column_values {
        id
        value
      }
    }
  }
}

And this library: gql · PyPI

Which I chose because it was the most popular Python client (as measured by github stars).

And I get this error from the lib when it parses the response:

graphql.error.graphql_error.GraphQLError: Int cannot represent non 32-bit signed integer value: 4531622611
GraphQL request:7:16
6 |
7 |   boards(ids: [4531622611]) {
  |                ^
8 |     name

@Matias.Monday , since you indicate that your API works well with Python, do you have any recommendations? Alternate libraries, workarounds?

Hello @A-A-ron,

I am sorry for the late reply!

Would you be able to please send an email to appsupport@monday.com so we can take a closer look from there?

Looking forward to hearing from you via email!

Cheers,
Matias

Hi Matias,

I am also facing this issue. I’m using Postman to generate HTTP request snippets to integrate with MS Power Automate flows. This query worked fine, so I know my connection is working:

query {
  boards (limit:20) {
    name
    id
  }
}

This query gives me the Int data type error (Int cannot represent non 32-bit signed integer value):

query {
  boards (ids: 36******00) {
    name
    state
    id
    permissions
  }
}

I’ve replaced some of my board’s ID with stars for privacy purposes, in the actual code, they are all numbers.

Whatever solution is found, can it please be posted here?

Thanks,
Abby

Hello @its-a-bee and welcome to the community!

I hope you like it here :muscle:

Please send an email to appsupport@monday.com with the exact query you are using in Postman and the response you are getting and we will take a look into it over there :grin:

Looking forward to hearing from you over email!

Cheers,
Matias

Matias,

I’m still getting the error (“Int cannot represent non 32-bit signed integer value”) but I was able to get the query to work by setting Postman to use “No schema” instead of auto-fetching a schema. Not sure what’s going on, but it’s working so I’m not going to send an email to appsupport. Just wanted you to be aware of my fix.

Hello again,

Thank you for sending that information over!

I am glad you found that fix!

Cheers,
Matias

I am getting this error directly in the Monday playground, using valid Ids from my board. Is Monday working on a fix for this?

Hello there @mcallarse

If you are referring to the error where the IDs appear underlined in red, it is a visual error but you can still run the queries/mutations.

Our team is aware and working on it.

Cheers,
Matias