Servicenow Graphql query for child

alpegulay
Giga Contributor

I have a table data which has can contain child category on it or the actual data items as structured as below:

Category 1
	-Category 1.1
		-[item1,item2...]
	-Category 1.2
		-[item1,item2...]
		-Category 1.2.1
			-[item1,item2...]
		-Category 1.2.2
			-[item1,item2...]
			-Category 1.2.2.1
				-Category 1.2.2.2
			
		... to nth level

so a data could have a category or the actual list of data items. A category could have another set of categories. It could also have the actual data items.

So I have to like check out the categories and drill it down to capture the actual data. This is to the nth level.

I am doing the logic through C# code and perform the recursion stuff. I'm not so comfortable with this approach. Wondering if we could do this using Graphql though.

Has anyone does this before? Or any idea. 

Thanks

 

0 REPLIES 0