-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(graphql): introduce GraphQL package
closes #237
- Loading branch information
Showing
7 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# @har-sdk/graphql | ||
|
||
[![Maintainability](https://api.codeclimate.com/v1/badges/4acaec95c82465cb2c3d/maintainability)](https://codeclimate.com/github/NeuraLegion/har-sdk/maintainability) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/4acaec95c82465cb2c3d/test_coverage)](https://codeclimate.com/github/NeuraLegion/har-sdk/test_coverage) | ||
[![Build Status](https://github.com/NeuraLegion/har-sdk/actions/workflows/auto-build.yml/badge.svg?branch=master)](https://github.com/NeuraLegion/har-sdk/actions/workflows/auto-build.yml?query=branch%3Amaster+event%3Apush) | ||
[![NPM Downloads](https://img.shields.io/npm/dw/@har-sdk/graphql?label=NPM%20Downloads)](https://www.npmjs.com/package/@har-sdk/graphql) | ||
|
||
Transform your [GraphQL introspection](https://spec.graphql.org/draft/#sec-Introspection) or [GraphQL schema collection](https://spec.graphql.org/draft) into a series of [HAR request objects](http://www.softwareishard.com/blog/har-12-spec/#request). This can be useful for a variety of purposes, such as analyzing network performance and debugging web applications. | ||
|
||
- Automatically generates fake data for all parameters | ||
- Simple and easy-to-use API. | ||
- Supports variety of community adopted [custom SCALAR](https://spec.graphql.org/draft/#sec-Scalars.Custom-Scalars) types out of the box. | ||
- Supports [GraphQL multipart request specification](https://github.com/jaydenseric/graphql-multipart-request-spec). | ||
|
||
With this library, you can easily generate requests with fake data to test your API using [AutoCannon](https://github.com/mcollina/autocannon#readme) or [DevTools](https://developer.chrome.com/blog/new-in-devtools-62/#har-imports). | ||
|
||
## Setup | ||
|
||
To install the library, run the following command: | ||
|
||
```bash | ||
$ npm i --save @har-sdk/graphql | ||
``` | ||
|
||
## License | ||
|
||
Copyright © 2024 [Bright Security](https://brightsec.com/). | ||
|
||
This project is licensed under the MIT License - see the [LICENSE file](https://github.com/NeuraLegion/har-sdk/blob/master/LICENSE) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
displayName: 'graphql', | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: '<rootDir>/tsconfig.json' | ||
} | ||
}, | ||
transform: { | ||
'^.+\\.[tj]s$': 'ts-jest' | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'json'], | ||
coverageDirectory: '../../coverage/graphql', | ||
preset: '../../jest.preset.js' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "@har-sdk/graphql", | ||
"version": "0.0.0", | ||
"private": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/NeuraLegion/har-sdk.git" | ||
}, | ||
"author": { | ||
"name": "Artem Derevnjuk", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/NeuraLegion/har-sdk/issues" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"dist/**" | ||
], | ||
"keywords": [ | ||
"graphql", | ||
"har", | ||
"api" | ||
], | ||
"main": "./dist/bundle.umd.js", | ||
"module": "./dist/bundle.esm5.js", | ||
"es2015": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"homepage": "https://github.com/NeuraLegion/har-sdk/tree/master/packages/graphql#readme", | ||
"scripts": { | ||
"prebuild": "npm run compile -- --clean", | ||
"build": "npm run compile && npm run bundle", | ||
"bundle": "rollup -c ../../rollup.config.js", | ||
"lint": "eslint --ignore-path ../../.eslintignore .", | ||
"format": "prettier --ignore-path ../../.prettierignore --check .", | ||
"compile": "tsc -b tsconfig.build.json", | ||
"test": "cross-env NODE_ENV=test jest", | ||
"coverage": "cross-env NODE_ENV=test jest --coverage" | ||
}, | ||
"dependencies": { | ||
"@har-sdk/core": "*", | ||
"tslib": "^2.3.1" | ||
}, | ||
"devDependencies": {} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "./dist", | ||
"declarationDir": "./dist" | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["src/**/*.spec.ts", "tests/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"rootDir": "." | ||
}, | ||
"include": ["src/**/*", "tests/**/*", "tests/**/*.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters