Skip to content

restfql/express-restfql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogoMakr-0suVuk Express RestFQL

Motivation

RestFQL for express is a rest middlevare that implements the specification.

In short RestFQL allows filtering of response driven by the querying side without breaking caching and keeping the capability for the backend to do optimizations as required.

Usage

  1. install with a package manager
npm install express-restfql

yarn add express-restfql
  1. Add the middleware to your express server
import express from 'express';
import restfql from 'express-restfql';
const app = express();

app.use(restfql)

app.get('/', (req, res) => {
  res.json({
    message: 'Hello World!', 
    description: "awesome description",
    tags:{
        mandatory: ["mand_tag1","mand_tag1"],
        optional:  ["opt_tag1","opt_tag1"],
    }
});
});

app.listen(3000);
  1. query passing the model as a query param call fql

preview query

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published