-
Notifications
You must be signed in to change notification settings - Fork 674
feature: Enhanced Client Awareness (v5) #6537
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
Conversation
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 2 changed, 0 removed
Build ID: 8fb8ccfe3e3a5d14727ae11b URL: https://www.apollographql.com/docs/deploy-preview/8fb8ccfe3e3a5d14727ae11b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinbonnin, @BoD - is this PR on the right track so far?
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Show resolved
Hide resolved
I'm not sure what the |
I cancelled the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Outdated
Show resolved
Hide resolved
a4e432f
to
f4fc35d
Compare
tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt
Show resolved
Hide resolved
tests/integration-tests/src/commonTest/kotlin/test/HttpRequestComposerTest.kt
Outdated
Show resolved
Hide resolved
@martinbonnin / @BoD - I think this is now ready for another review. |
} | ||
|
||
if (sendEnhancedClientAwarenessExtensions) { | ||
name("clientLibrary") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a reference that we could link as a comment here for future readers that would like more context for the feature?
...lo-api/src/commonMain/kotlin/com/apollographql/apollo/api/http/DefaultHttpRequestComposer.kt
Show resolved
Hide resolved
OK, I believe this is now all done. 🎉 I think the only thing left to discuss about it is whether we want v5 or v4 + v5? |
I've noticed that the |
OK, I see what the issue is; there are some test failures but the logs do not make that obvious. Looks like the test fixtures need to be updated or this feature disabled in those tests. Here's an example:
|
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 5 changed, 0 removed
Build ID: eb2155dce39d5e5df37fc967 URL: https://www.apollographql.com/docs/deploy-preview/eb2155dce39d5e5df37fc967 |
Indeed, tests updated in 611b459
This is usually when the JS test fail. The promise never returns and the test just hangs. Not 100% sure how to fix it. |
@martinbonnin - I think in this case it might be better to turn off the feature because of the version string; the tests will all need to be updated each time a new version is released. |
Oh wait..that was your commit updating them. |
I'd like to avoid those tests doing too much configuration. The drawback is that now the expected string is computed based on the current version instead of before it was a plain string literal but I think this is OKay. |
I just tested again by simulating an explicit failure and it worked well (after 2min still...). There is definitely something fishy in the JS test code but since this JS is not the highest used feature, I haven't taken the time to dive deep into this. Mid term I'm hoping that https://youtrack.jetbrains.com/issue/KT-58205/Kotlin-Gradle-Plugin-make-multiplatform-tests-build-cacheable makes this mostly indolore 🤞 |
Thanks for helping fix it. ❤️ |
{"operationName":"MultipleUpload","variables":{"files":[null,null]},"query":"mutation MultipleUpload($files: [Upload!]!) { multipleUpload(files: $files) { id path filename mimetype } }","extensions":{"clientLibrary":{"name":"apollo-kotlin","version":"5.0.0-SNAPSHOT"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the release.main.kts
script to take care of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
@@ -243,6 +244,18 @@ fun setVersionInIntelliJPlugin(version: String) { | |||
} | |||
} | |||
|
|||
fun setVersionInFixtures(nextSnapshot: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
This adds support for the Enhanced Client Awareness request extensions; similar to apollographql/apollo-ios-dev#638 in Apollo iOS.
Note: This PR is against
main
which makes it part of a future v5 release.