The Guild LogoThe Guild Monogram
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

Edit on GitHub