1.0.65 • Published 5 years ago
@begin-v/qry v1.0.65
Qry
Qry is library for map and query field from data
How to use Qry
import { qryQuery , qrySchema } from "@begin-v/qry"
const DATA = {
_id: 1,
movie_title: 'This is title',
tags: [{
id: 15,
name: 'like',
created_time: 'now()'
}],
}
How to use Qry schema
const r = qrySchema.map(
{ id: '_id', title: 'movie_title', tags: 'tags'},
DATA)
console.log(r)
How to use Qry query
const r = qryQuery.query(
`
{
id
title
tags {
name
}
}
`,
DATA)
console.log(r)