# @kingworldjs/graphql-jit

> A plugin for kingworld that add support for graphql jit

Latest version **0.0.0-experimental.0** (published 2022-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kingworldjs/graphql-jit
pnpm add @kingworldjs/graphql-jit
yarn add @kingworldjs/graphql-jit
bun add @kingworldjs/graphql-jit
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0-experimental.0 |
| Published | 2022-11-14 |
| First published | 2022-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 693 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | saltyAom |
| Maintainers | aomkirby123 |
| Keywords | kingworld, graphql |

## Links

- npm: https://www.npmjs.com/package/@kingworldjs/graphql-jit
- Repository: https://github.com/saltyaom/kingworld-graphql-jit
- Issues: https://github.com/SaltyAom/kingworld-graphql-jit/issues
- npm.io page: https://npm.io/package/@kingworldjs/graphql-jit

## Dependencies (7)

- [json-schema](https://npm.io/package/json-schema.md) ^0.4.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) 4.6.2
- [lodash.memoize](https://npm.io/package/lodash.memoize.md) ^4.1.2
- [lodash.mergewith](https://npm.io/package/lodash.mergewith.md) 4.6.2
- [generate-function](https://npm.io/package/generate-function.md) ^2.3.1
- [@graphql-tools/schema](https://npm.io/package/@graphql-tools/schema.md) ^9.0.9
- [@graphql-typed-document-node/core](https://npm.io/package/@graphql-typed-document-node/core.md) ^3.1.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.0.0-experimental.0 (latest) — 2022-11-14

## README

# @kingworldjs/graphql-jit
An **experimental** plugin for [kingworld](https://github.com/saltyaom/kingworld) that adds support for using GraphQL JIT.

## Installation
```bash
bun add graphql @kingworldjs/graphql-jit
```

## Example
```typescript
import { KingWorld } from 'kingworld'
import { graphql } from '../src'

const app = new KingWorld()
    .get('/', () => 'Hi')
    .post('/mirror', (context) => context.body)
    .use(graphql, {
        resolvers: {
            Query: {
                hello: () => 'Hello world!'
            }
        },
        schema: `
            type Query {
                hello: String
            }`
    })
    .listen(8080)
```

### path
@default "/graphql"

Path to expose as GraphQL handler

### schema

GraphQL schema
### resolvers
Resolvers funcitons
```typescript
resolvers: {
    Query?: Record<string, Function | Promise<Function>>
    Mutation?: Record<string, Function | Promise<Function>>
    Subscription?: Record<string, Function | Promise<Function>>
}
```

---
_Source: https://npm.io/package/@kingworldjs/graphql-jit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
