# @omnigraph/json-schema

> This package generates GraphQL Schema from JSON Schema and sample JSON request and responses. You can define your root field endpoints like below in your GraphQL Config for example;

Latest version **0.112.4** (published 2026-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @omnigraph/json-schema
pnpm add @omnigraph/json-schema
yarn add @omnigraph/json-schema
bun add @omnigraph/json-schema
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.112.4 |
| Published | 2026-09-04 |
| First published | 2021-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 22 |
| Unpacked size | 280.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3511 |
| Maintainers | dotansimha, urigo, ardatan, kamilkisiela, theguild-bot |

## Links

- npm: https://www.npmjs.com/package/@omnigraph/json-schema
- Repository: https://github.com/ardatan/graphql-mesh
- Homepage: https://github.com/ardatan/graphql-mesh#readme
- Issues: https://github.com/ardatan/graphql-mesh/issues
- npm.io page: https://npm.io/package/@omnigraph/json-schema

## Dependencies (22)

- [qs](https://npm.io/package/qs.md) ^6.16.0
- [ajv](https://npm.io/package/ajv.md) ^8.20.0
- [dset](https://npm.io/package/dset.md) ^3.1.4
- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [url-join](https://npm.io/package/url-join.md) 4.0.1
- [ajv-formats](https://npm.io/package/ajv-formats.md) ^3.0.1
- [pascal-case](https://npm.io/package/pascal-case.md) 3.1.2
- [json-machete](https://npm.io/package/json-machete.md) ^0.97.8
- [graphql-fields](https://npm.io/package/graphql-fields.md) ^2.0.3
- [to-json-schema](https://npm.io/package/to-json-schema.md) ^0.2.5
- [graphql-compose](https://npm.io/package/graphql-compose.md) ^9.1.0
- [graphql-scalars](https://npm.io/package/graphql-scalars.md) ^1.22.4
- [@whatwg-node/fetch](https://npm.io/package/@whatwg-node/fetch.md) ^0.10.6
- [@graphql-mesh/types](https://npm.io/package/@graphql-mesh/types.md) ^0.107.1
- [@graphql-mesh/utils](https://npm.io/package/@graphql-mesh/utils.md) ^0.107.1
- [@graphql-tools/utils](https://npm.io/package/@graphql-tools/utils.md) ^11.2.2
- [@graphql-tools/delegate](https://npm.io/package/@graphql-tools/delegate.md) ^12.1.1
- [@graphql-mesh/cross-helpers](https://npm.io/package/@graphql-mesh/cross-helpers.md) ^0.4.16
- [@graphql-mesh/transport-rest](https://npm.io/package/@graphql-mesh/transport-rest.md) ^0.12.2
- [@graphql-mesh/transport-common](https://npm.io/package/@graphql-mesh/transport-common.md) ^1.0.20
- [@json-schema-tools/meta-schema](https://npm.io/package/@json-schema-tools/meta-schema.md) ^1.7.5
- [@graphql-mesh/string-interpolation](https://npm.io/package/@graphql-mesh/string-interpolation.md) ^0.5.18

## Recent versions

- 0.112.4 (latest) — 2026-09-04
- 0.112.5-alpha-20260916133444-ce8037dc4a09d11d4e7ced5bca17edb26fce20c1 (alpha) — 2026-09-16
- 0.112.5-alpha-20260916125759-7f73bcfa0d213b0437586b0bf3d848ed2a740a35 — 2026-09-16
- 0.112.5-alpha-20260916111231-57a5ca721ed2e4f61ae6f0ebb8e4d5fd46433a29 — 2026-09-16
- 0.112.4-alpha-20260904110918-879a5d01ea053d8f98fa234b8ff4393540afe506 — 2026-09-04
- 0.112.3 — 2026-08-24
- 0.112.3-alpha-20260824170230-ae4841286ab9e75167dd77db1471acd7d105129b — 2026-08-24
- 0.112.3-alpha-20260824165539-fa807c4e594ecb473cee9a4cc69e5a1d160af6fa — 2026-08-24
- 0.112.3-alpha-20260824163757-c516946488ec1dd819b76ebc85addbd3a8901e6c — 2026-08-24
- 0.112.3-alpha-20260824163656-e44ecfb832f4114782c798b33c2d013e5a7183b8 — 2026-08-24
- 0.112.3-alpha-20260824162813-61fabf534298b284ce13e442739d3ff3474c50ca — 2026-08-24
- 0.112.3-alpha-20260824161404-187ecca4a6648eccdbdee6d24b9ab065df04d6d1 — 2026-08-24
- 0.112.2 — 2026-08-20
- 0.112.2-alpha-20260820121917-9ca6d05c00be0c50aa2eb7d2cc46bba53dcf4b69 — 2026-08-20
- 0.112.1 — 2026-08-17
- … 3956 more at https://npm.io/package/@omnigraph/json-schema/versions

## README

## JSON Schema (@omnigraph/json-schema)

This package generates GraphQL Schema from JSON Schema and sample JSON request and responses. You
can define your root field endpoints like below in your GraphQL Config for example;

```yaml filename=".graphqlrc.yml"
schema:
  myOmnigraph:
    loader: '@omnigraph/json-schema'
    # The base URL of your following endpoints
    endpoint: http://www.my-api.com
    # The headers will be used while downloading JSON Schemas and Samples
    schemaHeaders:
      Content-Type: application/json
    # The headers will be used while making requests via HTTP
    operationHeaders:
      Accept: application/json
      Content-Type: application/json
      Authorization: Bearer TOKEN
    # Endpoints
    operations:
      # Root Type
      - type: Query
        # The Field Name in the specified Root Type
        field: me
        # Description
        description: My Profile
        # The relative URL to the defined `endpoint`
        path: /user/{args.id} # args will generate an argument for the field and put it here automatically
        # The HTTP method
        method: GET
        # The path of the relevant JSON Schema for the return type
        responseSchema: ./json-schemas/user.json#/definitions/User
      - type: Mutation
        field: createUser
        path: /user
        method: PUT
        # A JSON sample file for the request body
        requestSample: ./json-samples/user-input.json
        # GraphQL type name for the request body
        requestTypeName: CreateUpdateUser
        # A JSON sample file for the response body and it points to the specific definition using JSON Pointer pattern
        responseSchema: ./json-schemas/user.json#/definitions/User
```

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