Hello, do subscriptions work in multiplatform environment? Especially on iOS? Is there any public GQ...
r
Hello, do subscriptions work in multiplatform environment? Especially on iOS? Is there any public GQL server that supports subscription to test that out?
m
Subscriptions are working on iOS. Public servers are rare. I don't know why most of the times subscriptions are behind authentication, I'm guessing cost reasons. The Android tutorial has a section about subscriptions that use a test server: https://www.apollographql.com/docs/kotlin/tutorial/11-subscriptions/
It's for Android but the same code should work for iOS
r
thx a lot, Iโ€™ll look at it.
query works in sandbox but subscription donโ€™t ๐Ÿ˜ž
m
I'm guessing this is a sandbox issue, not a server issue
r
sure
m
I somehow managed to make it work using https://apollo-fullstack-tutorial.herokuapp.com/graphql as endpoint (with the final
graphql
)
I'll follow up internally to see what the issue is
r
๐Ÿ™ 1
๐Ÿ‘ 1
j
just fyi that I've recently deployed graphql backend that supports subscriptions in case it's of use - https://peopleinspace-graphql-guhrsfr7ka-uc.a.run.app/playground you can use likes of following (will update every 10s with latest position of ISS space station)
Copy code
subscription {
  issPosition {
    latitude
    longitude
  }
}
๐Ÿ’œ 2