Home

Awesome

<h1 align="center"> <img alt="" src="graphql-filter.svg" width="192" /><br /> Welcome to graphql-filter 👋 </h1> <p> <a href="https://www.npmjs.com/package/graphql-filter" target="_blank"> <img alt="Version" src="https://img.shields.io/npm/v/graphql-filter.svg"> </a> <a href="https://github.com/hata6502/graphql-filter/blob/master/LICENSE" target="_blank"> <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /> </a> <a href="https://lgtm.com/projects/g/hata6502/graphql-filter/alerts/"> <img alt="Total alerts" src="https://img.shields.io/lgtm/alerts/g/hata6502/graphql-filter.svg?logo=lgtm&logoWidth=18"/> </a> <a href="https://lgtm.com/projects/g/hata6502/graphql-filter/context:javascript"> <img alt="Language grade: JavaScript" src="https://img.shields.io/lgtm/grade/javascript/g/hata6502/graphql-filter.svg?logo=lgtm&logoWidth=18"/> </a> <a href="https://codecov.io/gh/hata6502/graphql-filter"> <img src="https://codecov.io/gh/hata6502/graphql-filter/branch/master/graph/badge.svg" /> </a> <a href="https://twitter.com/hata6502" target="_blank"> <img alt="Twitter: hata6502" src="https://img.shields.io/twitter/follow/hata6502.svg?style=social" /> </a> </p>

A GraphQL middleware to filter output data.

💡 Motivation

When implementing a GraphQL API, you may want to filter the output. Another layer should be used especially if the reason is due to settings or privacy. graphql-filter provides comprehensive filtering by GraphQL Types. It may be able to implement flexible read control with graphql-filter and graphql-shield.

Example

Please see test and snapshots.

Install

yarn add graphql-filter graphql-middleware

Run tests

yarn test

Author

<img alt="hata6502" src="https://avatars.githubusercontent.com/hata6502" width="48" /> hata6502

🤝 Contributing

Contributions, issues and feature requests are welcome!<br /> Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 hata6502.<br /> This project is MIT licensed.

Disclaimer

Please see DISCLAIMER.md.


This README was generated with ❤️ by readme-md-generator