Skip to content

Context injection deprecation #1304

@jbrwn

Description

@jbrwn

Im upgrading to v5.2.0 and I am curious what the long term plan is around the now deprecated context injection functionality.

https://github.com/ExpediaGroup/graphql-kotlin/blob/master/website/docs/schema-generator/execution/contextual-data.md#interface-injection-deprecated

The example below will not generate any deprecation warnings even though the GraphQLContext interface itself has been deprecated. This may sneak up on some users when the injection "magic" suddenly stops working. Not sure what the best approach is here. Maybe log a warning at runtime? Thanks in advance for taking a look at this.

    fun contextualQuery(
        context: MyGraphQLContext,
        value: Int
    ): String = "The custom value was ${context.customValue} and the value was $value"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions