refract-query
v0.0.1
Published
## Usage
Downloads
6
Readme
Refract Query
Usage
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'});
Examples
Get all HTTP Requests elements
const results = query([Refract Element], {element: 'httpRequest'});
Get all HTTP Responses elements
const results = query([Refract Element], {element: 'httpResponse'});
Get all Resource Groups
const results = query([Refract Element], {
"element": "category",
"meta": {
"classes": [
"resourceGroup",
],
},
});