Skip to content

Support creating the new context map #1292

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 7 commits into from
Oct 28, 2021

Conversation

smyrick
Copy link
Contributor

@smyrick smyrick commented Oct 27, 2021

📝 Description

GraphQL Java 17 introduced the new context map instead of one object. We need to be able to pass this in to the execution input for queries, mutations, and subscriptions for things like the PreParsedDocumentProvider options

🔗 Related Issues

Backwards compatible version of this PR: #1277

@smyrick smyrick added changes: minor Changes require a minor version module: server Issue affects the server code labels Oct 27, 2021
@dariuszkuc
Copy link
Collaborator

Can you also update the docs

@@ -31,7 +30,7 @@ class RequestExtensionsKtTest {
val request = GraphQLRequest(query = "query { whatever }")
val executionInput = request.toExecutionInput()
assertEquals(request.query, executionInput.query)
assertNull(executionInput.context)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is not set, then graphql-java defaults to empty object. This is a much better validation regardless of the new map

@smyrick smyrick merged commit dfdb24a into ExpediaGroup:master Oct 28, 2021
@smyrick smyrick deleted the graphql-context-map branch October 28, 2021 18:19
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
* Support creating the new context map

* Fix subscription hooks

* Update docs and deprecation notice

* Use inline builder

* Update unit test docs

* Use default context map in subscriptions test

* Undo public arg name changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: minor Changes require a minor version module: server Issue affects the server code
Development

Successfully merging this pull request may close these issues.

2 participants