Apollo-android: Support JS target in multiplatform projects

Created on 23 Jul 2020  路  2Comments  路  Source: apollographql/apollo-android

Is your feature request related to a problem? Please describe.

  • Many projects include a JS target. Supporting JS targets will increase Apollo鈥檚 viability when being considered for multi-platform projects.
  • It is not straightforward to use Apollo in projects that include a JS target. This is due to the apollo-runtme-kotlin artifact, which can鈥檛 be used in commonMain. One workaround is to include apollo-runtime-kotlin-jvm in androidMain and apollo-runtime-kotlin-ios-x64 in iosMain, then write dozen of expect/actual to fill the gap in jsMain

Describe the solution you'd like

  • Add js target in the build definition.
  • Provide actual implementations for the required classes (i.e ApolloHttpNetworkTransport).
  • Probably many more things.
Good First Issue Feature

Most helpful comment

apollo-api will be able to target JS with 2.2.4 (see #2467). Updated todo list:

  • [x] add a JS target to apollo-api
  • [ ] implement ApolloHttpNetworkTransport for JS
  • [ ] implement WebSocketFactory for JS

All 2 comments

apollo-api will be able to target JS with 2.2.4 (see #2467). Updated todo list:

  • [x] add a JS target to apollo-api
  • [ ] implement ApolloHttpNetworkTransport for JS
  • [ ] implement WebSocketFactory for JS
Was this page helpful?
0 / 5 - 0 ratings