realm / realm-graphql-service

GraphQL service for Realm Object Server
https://realm.io
Apache License 2.0
43 stars 10 forks source link

Invalid options provided to ApolloServer: User is no longer valid. #94

Closed cclinh closed 4 years ago

cclinh commented 4 years ago

We have a web app that connect to a production realm server using GraphQL. Its working normally for months. Recently, we can't connect to realm server using graphql. The error response is: Invalid options provided to ApolloServer: User is no longer valid.

has anyone run into the same problem?

nirinchev commented 4 years ago

How are you authenticating the user?

cclinh commented 4 years ago

@nirinchev I followed the instruction here https://docs.realm.io/sync/graphql-web-access/using-the-graphql-client

const credentials = Credentials.usernamePassword('SOME-USERNAME', 'SOME-PASSWORD');
const user = await User.authenticate(credentials, 'http://my-ros-instance:9080');

Its worth mentioning that it has worked normally before and the error occurs on realm studio as well

nirinchev commented 4 years ago

Hm... Do you use query based sync via graphql? If you're using the legacy Realm Cloud, can you open a support ticket and ask the team to restart your graphql service? If you're self hosting ROS, can you try restarting it yourself?

cclinh commented 4 years ago

@nirinchev Thanks for your support. I opened a ticket to realm support team and got the answer that it was a server issue in us1 region. The graphql server is working normally now. This is not an issue with realm graphql client so I'll close this issue