Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.53 KB

File metadata and controls

49 lines (30 loc) · 1.53 KB

MiniQL - JSON files example

An example of MiniQL - the tiny JSON-based query language inspired by GraphQL.

This example shows how to use miniql and @miniql/json to run queries against a set of JSON files.

Example Star Wars data is courtesy of Kaggle.

You need Node.js installed to run this example code.

Any problems? Please log an issue on this repo.

Love this? Please star the repo and support my work

Repo contents

/miniql-json-example
    index.js    -> Example code that runs various queries against the JSON files.
    /data
        ...     -> Various JSON files with data from the Star Wars universe.

Setup

Download a the zip file of this code or use Git to clone this repository.

Open a terminal, change directory to the repo and install dependencies:

cd miniql-json-example
npm install

Run the code

Open a terminal, change directory to the repo and run the code using Node.js:

cd miniql-json-example
npm start

A bunch of example queries will run and results are displayed in the terminal.

Please read index.js to see each example query.

Don't forget to star the repo and follow the developer on Twitter.