Hi,
I am trying to fetch the column title and their id’s of a particular board by passing its id(boardId) but I am getting the result of all the boards that are there in my workspace.
Can anybody help me out if i want to have the result for that particular board only?
Note : When I try the same query on API Playground,I get a perfect result.
Thank you for your quick response but If you can see my screenshot, I am also doing the same way but still not getting the specific result though its working fine in Playground.
I have tried the other ways as well both on Playground and Code but its only fruitful on Playground not in the application.
@Helen I am getting column list of a board when I click on the array ,where I want to get the specific for just one board whose id I am passing into the query
But I still have a doubt why is it mandatory to have the variable name as variables, It should have worked the same for any other as well?
Or Is it something related to the predefined variable for Graphql?
The api takes an object with a property name of variables and other properties as a second parameter. By using another other property name apart from variables, that property doesn’t exist and therefore, the API wouldn’t recognize that property. It’s the same as going to the playground and providing no variables at all. It will return all the data just as it returned in your case.
If you want to use any other name apart from variables, then use will have to write the object key and value in full. Since the variable is called variable and the property name is also variable,we can object the value and JavaScript will reference the variables property automatically.
Here is an example of using another variable name instead of variables