Registry / devops / sla-graphql-manager

sla-graphql-manager

JSON →
library0.0.16jsnpmunverified

A Node.js library for managing Service Level Agreements (SLA) for GraphQL APIs. It introspects a GraphQL endpoint, validates queries and mutations against SLA rules defined in YAML, and ensures API compliance. Current version 0.0.16, early stage with no recent updates. Differentiator: focused on SLA enforcement for GraphQL, not just rate limiting. Supports custom introspection depth and authentication headers.

npm install sla-graphql-manager
INSTALL
IMPORT
SIG · SLA-GRAPHQL-MANAGE
S
sla-graphql-manager
devopsjavascriptv0.0.16
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

instanceSLAGraphqlManager
import { instanceSLAGraphqlManager } from 'sla-graphql-manager'
const instanceSLAGraphqlManager = require('sla-graphql-manager')
ESM-only export; no CommonJS default available. Use named import.

Initialize SLA manager with introspection config, register a YAML SLA agreement, and handle validation result.

import { instanceSLAGraphqlManager } from 'sla-graphql-manager'; import fs from 'fs'; const manager = instanceSLAGraphqlManager({ introspectionConf: { url: process.env.GRAPHQL_API_URL ?? 'https://api.spacex.land/graphql', headers: {}, levels: 4 } }); const slaAgreement = fs.readFileSync('sla.yaml', 'utf8'); const error = await manager.registerSLA(slaAgreement); error !== true ? (console.error('SLA validation failed'), process.exit(1)) : (console.log('SLA compliant'), process.exit(0));
Debug
Known issues
breakingThe package is pre-1.0 and may have breaking changes in minor/patch versions.
fix
Pin to exact version and test on upgrade.
affects: <1.0.0
gotchainstanceSLAGraphqlManager is the only export; no other named exports exist.
fix
Use named import as shown.
affects: >=0.0.1
deprecatedNo deprecation warnings known, but library is low activity (last release 2+ years ago).
fix
Consider if actively maintained for production use.
affects: >=0.0.1
Errors
Common errors & fixes
Cannot find module 'sla-graphql-manager'
Package not installed or wrong import path
fix
Run 'npm install sla-graphql-manager' and ensure using ESM import syntax.
TypeError: instanceSLAGraphqlManager is not a function
Using default import instead of named import
fix
Use 'import { instanceSLAGraphqlManager } from 'sla-graphql-manager''
Error: Introspection failed: Network error
API URL inaccessible or requires authentication
fix
Check url and provide headers if needed; verify network connectivity.
Upgrade
Version history
0.0.16latest on npm
Audit
Dependencies
graphqlrequiredRequired for introspection queries and schema validation
yamlrequiredParsing SLA agreement YAML files
node-fetchrequiredHTTP requests for introspection
Agent activity
11 hits · last 30 days
node
10
Resources
sla-graphql-manager — npm install sla-graphql-manager · libregistry