realm / realm-graphql-service

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

Cannot access reference realms #47

Closed eliedrian closed 6 years ago

eliedrian commented 6 years ago

GraphQL can't access reference realms. This error appears when you attempt to access realm via realm-graphql-client

{"type":"https://realm.io/docs/object-server/problems/invalid-realm-type","title":"The type of the Realm file was invalid.","status":400,"code":619}

Tried setting the realm's permissions to allow the user accessing it, but the same error appears. For now, our workaround is to set the user as an Administrator, which allows access.

Thing to note, I've tried opening full realms, they work. On upgrading them to reference realms, they stop working.

eliedrian commented 6 years ago

Follow up

Dids commented 6 years ago

Also seeing this, but even if I try to access the GraphQL API of a reference realm with an admin user, I still can't seem to query anything:

Invalid options provided to ApolloServer: Query fields must be an object with field names as keys or a function which returns such an object.

@LucidComplex From the sounds of it, you can still query after authenticating as an admin?

eliedrian commented 6 years ago

@Dids Yes, I can still query when using an admin user.

I can't access with a regular user, even if the reference realm was created by the same user.

nirinchev commented 6 years ago

Reference realms are indeed accessible only by admin users. We are going to lift this limitation in a future version, but for now you'll need to deploy an intermediary service that reads data as an admin and serves it to non-admins.

astigsen commented 6 years ago

Closing this for now as it relates to an outdated version of ROS and the question was answered. Please reopen if the problem resurfaces.

Dids commented 5 years ago

@nirinchev Is this still an issue with the latest Realm GraphQL client and Realm Cloud?

nirinchev commented 5 years ago

No, this has been resolved, but you need to make sure to connect using query-based sync.