# @envelop/immediate-introspection

Latest version **7.2.1** (published 2026-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @envelop/immediate-introspection
pnpm add @envelop/immediate-introspection
yarn add @envelop/immediate-introspection
bun add @envelop/immediate-introspection
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.2.1 |
| Published | 2026-09-16 |
| First published | 2022-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 8528 |
| Author | Saihajpreet Singh <saihajpreet.singh@gmail.com> |
| Maintainers | dotansimha, enisdenjo, theguild-bot |

## Links

- npm: https://www.npmjs.com/package/@envelop/immediate-introspection
- Repository: https://github.com/graphql-hive/graphql-yoga
- Homepage: https://github.com/graphql-hive/graphql-yoga/tree/main/packages/envelop/plugins/immediate-introspection#readme
- npm.io page: https://npm.io/package/@envelop/immediate-introspection

## Recent versions

- 7.2.1 (latest) — 2026-09-16
- 8.0.0-alpha-20261009120802-464ace7b331b5693c49d18e270d79cb071e59247 (alpha) — 2026-10-09
- 5.1.3-rc-20250306153119-ed3979491f3ac71caf439dd723f2d12d26b1000f (rc) — 2025-03-06
- 8.0.0-alpha-20261006205119-381bef34d7da2fde417073fec18c06eb58224f87 — 2026-10-06
- 8.0.0-alpha-20260929215310-f756e1d4981e8dd5ac5e128b5c2554893ae24a52 — 2026-09-29
- 7.2.0 — 2026-08-19
- 8.0.0-alpha-20260420122826-afff629b648b45dc56cbf71f10a44eb4006be3c3 — 2026-04-20
- 7.1.1-alpha-20260211135637-93c20e8d6487b818cbaeae5d79720080f2cdb30f — 2026-02-11
- 7.1.1-alpha-20260211135549-d5b47440cdcf7b0c44848a5d2d061d5bd2270ca4 — 2026-02-11
- 7.1.1-alpha-20260211135457-17dcb4f75d8b14c54c5b72820d4adc64ee17a76b — 2026-02-11
- 7.1.1 — 2026-02-11
- 7.1.1-alpha-20260211134540-a42c1c0e06864232b43671a2c90543caf9e7a99a — 2026-02-11
- 7.1.1-alpha-20260211133743-c4aa2c6402a6830521632f3ae388267ba187aba3 — 2026-02-11
- 7.1.0 — 2026-01-20
- 7.1.0-alpha-20260120170745-adbe13e06b251f86813e84382d87a6113a9c11cf — 2026-01-20
- … 1437 more at https://npm.io/package/@envelop/immediate-introspection/versions

## README

## `@envelop/immediate-introspection`

## Getting Started

```
yarn add @envelop/immediate-introspection
```

## Usage Example

Context building can be costly and require calling remote services. For simple GraphQL operations
that only select introspection fields building a context is not necessary.

The `useImmediateIntrospection` can be used to short circuit any further context building if a
GraphQL operation selection set only includes introspection fields within the selection set.

```ts
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine, useImmediateIntrospection } from '@envelop/core'
import { schema } from './schema'

const getEnveloped = envelop({
  plugins: [
    useEngine({ parse, validate, specifiedRules, execute, subscribe }),
    useSchema(schema),
    useImmediateIntrospection()
    // additional plugins
  ]
})
```

In case you want to authorize that an user is authenticated before allowing introspection the plugin
must be placed in front of the `useImmediateIntrospection()` call.

```ts
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine, useImmediateIntrospection } from '@envelop/core'
import { schema } from './schema'
import { useAuthorization } from './useAuthorization'

const getEnveloped = envelop({
  plugins: [
    useEngine({ parse, validate, specifiedRules, execute, subscribe }),
    useSchema(schema),
    useAuthorization(), // place this before
    useImmediateIntrospection()
    // additional plugins
  ]
})
```

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