The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Envelop Logo

Envelop

Get Started

Plugin Hub > useExtendContext

yarn add @envelop/core

useExtendContext#

Easily extends the context with custom fields.

import { envelop, useExtendContext } from '@envelop/core'; import { buildSchema } from 'graphql'; const getEnveloped = envelop({ plugins: [ useExtendContext(async (contextSoFar) => { return { myCustomField: { ... } } }), // ... other plugins ... ], });

Plugin Details