Skip to content

[generator] add runtime warning on deprecated context usage #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 9, 2021

Conversation

dariuszkuc
Copy link
Collaborator

📝 Description

This PR updates FunctionDataFetcher so that it logs a warning when injecting a GraphQLContext. This functionality is deprecated. Unlike the GraphQLContext interface itself, which is annotated @deprecated, there is no compile or runtime time warning when using GraphQLContext` interface injection in a query or mutation.

🔗 Related Issues

jbrwn and others added 4 commits November 23, 2021 12:26
This PR updates `FunctionDataFetcher` so that it logs a warning when injecting a `GraphQLContext`.  This functionality is [deprecated](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/website/docs/schema-generator/execution/contextual-data.md#interface-injection-deprecated).  Unlike the `GraphQLContext` interface itself, which is annotated `@deprecated, there is no compile or runtime time warning when using `GraphQLContext` interface injection in a query or mutation.

Related:
* discussion: ExpediaGroup#1305
* supersedes: ExpediaGroup#1306
@dariuszkuc dariuszkuc added changes: patch Changes require a patch version module: generator Issue affects the schema generator and federation code labels Dec 9, 2021
@dariuszkuc dariuszkuc merged commit 9c3cfe4 into ExpediaGroup:master Dec 9, 2021
@dariuszkuc dariuszkuc deleted the context_warning branch December 9, 2021 18:09
dariuszkuc added a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
…roup#1323)

### 📝 Description
This PR updates `FunctionDataFetcher` so that it logs a warning when injecting a `GraphQLContext`.  This functionality is [deprecated](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/website/docs/schema-generator/execution/contextual-data.md#interface-injection-deprecated).  Unlike the `GraphQLContext` interface itself, which is annotated `@deprecated, there is no compile or runtime time warning when using `GraphQLContext` interface injection in a query or mutation.

### 🔗 Related Issues
* discussion: ExpediaGroup#1305
* supersedes: ExpediaGroup#1306

Co-authored-by: Joel Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version module: generator Issue affects the schema generator and federation code
Development

Successfully merging this pull request may close these issues.

4 participants