Skip to content
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

Update Apollo GraphQL packages to v4.1.0 #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 5, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.apollographql.apollo 4.0.1 -> 4.1.0 age adoption passing confidence
com.apollographql.apollo:apollo-testing-support 4.0.1 -> 4.1.0 age adoption passing confidence
com.apollographql.apollo:apollo-normalized-cache-sqlite 4.0.1 -> 4.1.0 age adoption passing confidence
com.apollographql.apollo:apollo-normalized-cache 4.0.1 -> 4.1.0 age adoption passing confidence
com.apollographql.apollo:apollo-runtime 4.0.1 -> 4.1.0 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

apollographql/apollo-kotlin (com.apollographql.apollo)

v4.1.0

2024-11-04

Ktor 3.0.0

Version 4.1.0 updates usages of Ktor from 2.3.11 to 3.0.0:

  • If you are using apollo-runtime-js or apollo-debug-server-jvm, you need to update your app to Ktor 3.0.0+ at the same time as updating to Apollo 4.1.0 (apollo-debug-server-android is unaffected).
  • If you are using the deprecated apollo-mockserver or apollo-ktor-support from this repo, you need to update to the new coordinates.

All other cases are unaffected. In particular, apollo-runtime on Android and iOS uses OkHttp and NsUrlConnection respectively and is not impacted by the Ktor update.

You can read more details in the pull request.

New media type: application/graphql-response+json

application/graphql-response+json is a new media type being introduced by the GraphQL over HTTP draft. It allows differentiating a valid GraphQL response from an error JSON response that could be transmitted by a cache or proxy in the HTTP chain.

If your server uses application/graphql-response+json and returns non-2xx response, Apollo Kotlin will now parse those responses and expose data and errors instead of returning an ApolloHttpException before.

If you need to access the status code, you can do so using executionContext[HttpInfo]. For an example, you can restore the throwing behaviour with the following interceptor:

object : ApolloInterceptor {
  override fun <D : Operation.Data> intercept(
      request: ApolloRequest<D>,
      chain: ApolloInterceptorChain,
  ): Flow<ApolloResponse<D>> {
    return chain.proceed(request).onEach {
      val httpInfo = it.executionContext[HttpInfo]
      if (httpInfo != null && httpInfo.statusCode !in 200..299) {
        throw ApolloHttpException(httpInfo.statusCode, httpInfo.headers, null, "HTTP request failed")
      }
    }
  }
}
K2 support for the IntelliJ plugin

The IntelliJ plugin is now compatible with K2 (#​6150)

👷‍♂️ All changes

  • [all] Update kotlinpoet to 2.0.0 (#​6215)
  • [all] Update to Ktor 3 (#​6214)
  • [all] Remove apollo-mockserver and apollo-ktor-support (#​6215)
  • [all] Remove mockserver as a dependency of apollo-testing-support (#​6218)
  • [ast] Do not escape slashes in single quoted strings (#​6190)
  • [runtime] Add support for application/graphql-response+json (#​6170)
  • [runtime] Do not call experimental webSocket() method re-entrently (#​6197)
  • [debug server] Remove Ktor dependency from apollo-debug-server JVM (#​6224)
  • [codegen] Do not add internal to private members (#​6213)
  • [codegen] Fix name clash in data builder names when two types differ only by their case (#​6195)
  • [gradle plugin] Allow null in KSP arguments for Apollo Compiler Plugins (#​6200)
  • [gradle plugin] Do not log the full introspection JSON (#​6199)
  • [gradle plugin] Deprecate TargetLanguage.KOTLIN_1_5 (#​6193)
  • [IJ Plugin] Make the cache viewer understand the blob db format (#​6187)
  • [IJ Plugin] Bump IJ Platform Gradle Plugin to 2.0.1 (#​6185)
  • [IJ Plugin] Migrate to the K2 compatible Analysis API (#​6150)
  • [IJ Plugin] Schedule the GraphQL configuration reload early (#​6228)
  • [IJ Plugin] Rename related generated code when renaming an Operation/Fragment (#​6227)
  • [IJ Plugin] Only highlight the name of unused operations, rather than the whole operation (#​6226)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants