Dinoql

dinoql

Query JS objects in GraphQL style!

dinoql provides GraphQL syntax for safe access of objects with aliases support, default resolvers fragments, variables and caching support and is highly customizable.

Get it: npm install dinoql

Sample usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const dinoql = require('dinoql');

const data = {
  users: [{
    name: 'Victor Igor',
    id: "100",
    age: 18
  }, {
    name: 'Paul Gilbert',
    id: "200",
    age: 35
  }],  
};

dinoql(data)`
users(id: "200") {
    name
  }
`
// ^^ {users: [{name: 'Paul Gilbert'}]}

GIF FTW!

dinoql-demo

Suggest a module

Comments