How to comment in the GraphiQL’s variable section

How to comment in the GraphiQL’s variable section


0

When using GraphiQl how can I make comment’s in the variable section? Is it even possible?

For example I can make comment’s in the query section using # like:

query ProductVariants($quantityPro: Int!, $quantityVar: Int!) {
    products(first: $quantityPro) {
        edges {
            node {
                id
                # Title of the product
                title
                variants(first: $quantityVar) {
                    edges {
                        node {
                            id
                            # Title of the variant
                            title
                        }
                    }
                }
            }
        }
    }
}

But # doesn’t work on the variable section as the following # ends up generating error messages like "Bad Request".

{
    # Quantity of Products
    "quantityPro": 30,
    # Quantity of Variants
    "quantityVar": 30
}

I’ve also tried other common commenting syntax but no luck so far. However // works in Postman.

Share
Improve this question


Load 6 more related questions


Show fewer related questions

0

Reset to default



Leave a Reply

Your email address will not be published. Required fields are marked *