import query from 'refract-query';
const element = {
"element": "parseResult",
"meta": {},
"attributes": {},
"content": [
{
"element": "category",
"meta": {
"classes": [
"api"
]
},
"attributes": {},
"content": [
(...)
};
// Returns all HTTP Request elements
const results = query(element, {element: 'httpRequest'});
const results = query([Refract Element], {element: 'httpRequest'});
const results = query([Refract Element], {element: 'httpResponse'});
const results = query([Refract Element], {
"element": "category",
"meta": {
"classes": [
"resourceGroup",
],
},
});