graphql-safe-guards 1.0.2 β†’ 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## [1.0.2]
4
+
5
+ ### Added
6
+
7
+ - Preset-based configuration (`strict`, `balanced`, `relaxed`)
8
+ - Integration tests validating combined depth and complexity limits
9
+
10
+ ### Fixed
11
+
12
+ - Type-safe preset resolution
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ ![CI](https://github.com/Mateodiaz401/graphql-safe-guards/actions/workflows/ci.yml/badge.svg)
2
+ ![npm](https://img.shields.io/npm/v/graphql-safe-guards)
3
+ ![downloads](https://img.shields.io/npm/dm/graphql-safe-guards)
4
+ ![license](https://img.shields.io/npm/l/graphql-safe-guards)
5
+ ![typescript](https://img.shields.io/badge/TypeScript-Ready-blue)
6
+
1
7
  # graphql-safe-guards
2
8
 
3
9
  Protect your GraphQL API with a single import.
@@ -57,6 +63,8 @@ Internally, this package composes:
57
63
  - `graphql-safe-depth`
58
64
  - `graphql-complexity-validation`
59
65
 
66
+ The combination is validated through integration tests using native GraphQL validation.
67
+
60
68
  ---
61
69
 
62
70
  ## Supported Frameworks
@@ -79,6 +87,17 @@ for GraphQL query safety.
79
87
 
80
88
  ---
81
89
 
90
+ ## πŸ—ΊοΈ Roadmap
91
+
92
+ ### v1.x (current)
93
+
94
+ - βœ… Combine depth + complexity validation
95
+ - βœ… Presets support (`strict`, `balanced`, `relaxed`)
96
+ - βœ… Backward-compatible API
97
+ - βœ… Integration tests with `graphql-js`
98
+
99
+ > Roadmap items may change based on feedback and real-world usage.
100
+
82
101
  ## License
83
102
 
84
103
  MIT Β© Mateo Diaz
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-safe-guards",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Opinionated GraphQL security guards (depth + complexity) in one import",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,28 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { createSafeGuards } from "../src";
3
-
4
- describe("createSafeGuards", () => {
5
- it("uses strict preset", () => {
6
- const rules = createSafeGuards({ preset: "strict" });
7
-
8
- expect(rules).toHaveLength(2);
9
- });
10
-
11
- it("allows overriding preset values", () => {
12
- const rules = createSafeGuards({
13
- preset: "strict",
14
- depth: 10,
15
- });
16
-
17
- expect(rules).toHaveLength(2);
18
- });
19
-
20
- it("works without preset (backward compatible)", () => {
21
- const rules = createSafeGuards({
22
- depth: 4,
23
- complexity: 20,
24
- });
25
-
26
- expect(rules).toHaveLength(2);
27
- });
28
- });