Skip to content

Can subscriptions have middleware? #188

Closed
@nrbnlulu

Description

@nrbnlulu
Contributor

In execute you can pass a MiddlewareManager is there an alternative for subscribe?
I want to run code before a resolver is called.

Activity

Cito

Cito commented on Jan 4, 2023

@Cito
Member

This is currently not supported, but you can probably use a custom execution context as a workaround.

I will try to get this as a new feature into the next version. Maybe you can post a small example code how you expect it to work which I can then use as the basis for unit testing the feature.

self-assigned this
on Jan 4, 2023
added this to the v3.3 milestone on Jan 4, 2023
changed the title [-]Can subscriptions have middleware[/-] [+]Can subscriptions have middleware?[/+] on Jul 2, 2024
Cito

Cito commented on Jan 26, 2025

@Cito
Member

Note: This is available in v3.3.0a6 and newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureFeature request

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @Cito@nrbnlulu

    Issue actions

      Can subscriptions have middleware? · Issue #188 · graphql-python/graphql-core