Class CDISmallRyeContext

  • All Implemented Interfaces:
    io.smallrye.graphql.api.Context

    @Specializes
    @Priority(2147483647)
    public class CDISmallRyeContext
    extends SmallRyeContext
    Class that serves as a proxy decorator for obtaining the current SmallRyeContext. It always calls SmallRyeContext.getContext() to obtain the current instance, and delegates to it. This is necessary because the SmallRyeContext is an immutable class, yet we, in some cases, need to be able to inject different instances of it during the serving of one HTTP request. This way, we make sure that an @Inject-ed SmallRyeContext is never cached and calls to it always check if there is a new context instance assigned to the current thread.