# nfl-pro-client-gateway-service

> GraphQL backend client gateway for NFLPro

Latest version **1.0.18** (published 2023-03-07) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install nfl-pro-client-gateway-service
pnpm add nfl-pro-client-gateway-service
yarn add nfl-pro-client-gateway-service
bun add nfl-pro-client-gateway-service
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.18 |
| Published | 2023-03-07 |
| First published | 2023-03-07 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 14 |
| Unpacked size | 50.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Boom Sports |
| Maintainers | jonathan-boomsports |

## Links

- npm: https://www.npmjs.com/package/nfl-pro-client-gateway-service
- Repository: https://github.dm.nfl.com/NFL/be-nfl-pro-api
- Homepage: http://$npm_package_repository_url#readme
- Issues: https://github.com/boom-fantasy/nfl-service-template/issues
- npm.io page: https://npm.io/package/nfl-pro-client-gateway-service

## Dependencies (14)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.1
- [express](https://npm.io/package/express.md) ^4.18.1
- [graphql](https://npm.io/package/graphql.md) ^15.5.3
- [dataloader](https://npm.io/package/dataloader.md) ^2.1.0
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [type-graphql](https://npm.io/package/type-graphql.md) ^1.1.1
- [class-validator](https://npm.io/package/class-validator.md) ^0.13.1
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [graphql-type-json](https://npm.io/package/graphql-type-json.md) ^0.3.2
- [jest-ts-auto-mock](https://npm.io/package/jest-ts-auto-mock.md) ^2.1.0
- [apollo-server-core](https://npm.io/package/apollo-server-core.md) ^3.3.0
- [@boom-sports/baxios](https://npm.io/package/@boom-sports/baxios.md) ^1.0.6
- [apollo-server-express](https://npm.io/package/apollo-server-express.md) ^3.3.0

## Recent versions

- 1.0.18 (latest) — 2023-03-07

## README

# Client-Gateway Service

## Compile Typescript

Run `yarn compile` which will run the typescript compiler (`tsc`) using the `tsconfig.build.json` file for compiler settings. This compile is for the **build pipeline**. It does not include sourcemaps as part of its output.

## Run with Debug port open

Run `yarn start:debug`, which uses `nodemon` to run the server and detect changes in any `.ts` and `.json` files. This can be configured through a `nodemonConfig` key in `package.json` or by creating a `nodemon.json` file in the root of the project. The command is run with `exec` because there were some issues with properly clearing the port being used for development when the server would auto-restart.

## Run tests

The command `yarn test` is the base command for running tests. If you want to run with coverage or have tests re-run as you change code, use `yarn test:coverage` or `yarn test:watch` respectively. Additional commands can be passed to `jest` in the normal method. For example, `yarn test --watch` and `yarn test:watch` accomplish the same thing. This is one of the things run on pre-commit.

## Linting

Your editor should be set up to enable auto linting and fix on save. If you don't like a rule then use `.eslintrc.js` to modify it in some way.

## Typings

TypeScript typings are in the `./typings` directory and will be picked up by the `tsconfig.json` file. These files are how you provide typings and declarations for libraries that may not have them included. It is also how you extend existing types from libraries like `Express`. A Request example is included.

## VSCode and WebStorm

The `.idea` and `.vscode` folders have been intentionally committed. For WebStorm, it is set up to watch files and fix linting errors as well as format with prettier. There is also a run command set up tied to `yarn start:debug`, debugging and breakpoints work with this if you're on the latest version of WebStorm. VSCode is set up with a debug task to connect to the service when run via `yarn start:debug`, with breakpoints functioning properly.

## Docker

If you want to run the dev container locally you can use a command such as `docker run --env-file .env -p 127.0.0.1:8081:8081 -p 127.0.0.1:9229:9229 --name nfl-service-template -v "$(pwd)/src:/usr/app/src" nfl-service-template`

You can run all nfl services locally using docker-compose. See the README in the project's root for more details.

## Pre-commit Hooks

There are three precommit commands that run via the `yarn precommit` command: `yarn lint:check`, `yarn test`, and `yarn format:check`. When committing changes to a given folder within the mono-repo this command will be run via [lerna](https://github.com/lerna/lerna), and use [Husky](https://typicode.github.io/husky/#/) to make sure the precommit hook is run.

They can be bypassed with `git commit -m "My scumbag commit" --no-verify`. To add your own inconvenience into the commit process you can run `./node_modules/.bin/husky add .husky/pre-commit "command"`, for example `./node_modules/.bin/husky add .husky/pre-commit "yarn remove-large-files"`.

**If you commit from the service directory it will skip precommit hooks**. Make sure you're doing your commits from the top level to avoid introducing linting or formatting errors, or failing tests.

---
_Source: https://npm.io/package/nfl-pro-client-gateway-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
