Skip to content

January 20, 2025

Latest
Compare
Choose a tag to compare
@theguild-bot theguild-bot released this 20 Jan 10:39
· 24 commits to main since this release
4afbeb1

@graphql-yoga/[email protected]

Patch Changes

@graphql-yoga/[email protected]

Patch Changes

@graphql-yoga/[email protected]

Minor Changes

  • #3677
    7419797
    Thanks @ardatan! - Expose the server context as the second
    parameter, so introspection can be disabled based on the context

    import { createYoga } from 'graphql-yoga'
    import { useDisableIntrospection } from '@graphql-yoga/plugin-disable-introspection'
    
    // Provide your schema
    const yoga = createYoga({
      graphiql: false,
      plugins: [
        useDisableIntrospection({
          isDisabled: (_req, ctx) => !ctx.jwt
        })
      ]
    })
    
    const server = createServer(yoga)
    server.listen(4000, () => {
      console.info('Server is running on http://localhost:4000/graphql')
    })

@graphql-yoga/[email protected]

Patch Changes

  • #3677
    7419797
    Thanks @ardatan! - Ensure the JWT context has been added before any
    GraphQL Execution hooks when the plugin is used via Yoga