@apollo/utils.stripsensitiveliterals
Remove literals from an AST which might contain PII (strings and numbers)
Last updated 5 years ago by apollo-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @apollo/utils.stripsensitiveliterals 
SYNC missed versions from official npm registry.

stripSensitiveLiterals

The stripSensitiveLiterals function is used to remove string and numeric literals from a graphql DocumentNode which could be sensitive. Consider using variables instead!

Usage

import { stripSensitiveLiterals } from "@apollo/utils.stripsensitiveliterals";

stripSensitiveLiterals(
  parse(`#graphql
  query User {
    user(name: "Ada Lovelace", age: 31, ids: ["1", "2", "3"]) 
  }
`),
);
/**
  query User {
    user(name: "", age: 0, ids: ["", "", ""]) 
  }
*/

Current Tags

  • 3.1.0                                ...           latest (21 days ago)

7 Versions

  • 3.1.0                                ...           21 days ago
  • 3.0.0                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 13
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE