Closed suhodolskiy closed 5 months ago
For example, this will allow you to implement: Disabling introspection based on authentication
func (p *IntrospectionPlugin) SetupGatewayHandler(handler *handler.Server) { handler.AroundOperations( func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler { if u := authentication.GetRequestUserFromCtx(ctx); u.IsAuthorized() { graphql.GetOperationContext(ctx).DisableIntrospection = false } return next(ctx) }, ) }
@pkqk Thanks 🙌. When do you plan to release the next version that includes this feature?
@suhodolskiy I've put out v1.4.14.
We don't have a regular release schedule, we usually release once there's a few meaningful changes in. However if you're using a custom plugin you probably have to build your own main.go so you can pin it to whatever commit you want.
main.go
For example, this will allow you to implement: Disabling introspection based on authentication