GraphQL Query Variables Restricted to 'String | Number'

  • Goal: Be able to make GraphQL queries with boolean, object, etc. parameters. Currently only 'string | number' is supported

  • Steps:

    1. Create a query using a graphql resource
    2. GraphQL query takes a variable Boolean! type
    3. Add a variable to the query in retool
    4. Validation fails, explaining that the variable value can only be 'string | number'
  • Details: error message: The value has to be of type 'string | number', you provided 'boolean'

  • Screenshots:

Hello!

I was playing around with my Monday.com GraphQL resource and the linter DOES seem to say that you can't use boolean types, but I think the linter is just having a rough day. I ran the following query with an item [ID!] and a similar Boolean! setup and though the linter complained when I used true about it not being a string or number it didn't seem to care when I used false.

1 Like

Thanks! You're right that the linter isn't blocking the query from going through, and I appreciate your repro!

1 Like