Using custom domain with graphql endpoint

Hi all

As per the instructions here I know it is possible to setup a Mongo Realm app, setup static hosting on the mongodbstitch domain and then link a custom domain name so that users see my app hosted at:

www.MYDOMAIN.com
(which links to MYAPP.mongodbstitch.com)

My question:

In order to fully “brand” my app is it also possible to link the same or another custom domain to my exposed GraphQL endpoint, so that instead of seeing the default mongodb.com domains for auth and endpoint:

https://realm.mongodb.com/api/client/v2.0/app/MYAPP/auth/providers/.../login
https://realm.mongodb.com/api/client/v2.0/app/MYAPP/graphql

the GraphQL auth and endpoint would be something like one of the following:

1 - The same custom domain but expose a custom path (would also have to work with SPA app and be ignored by the SPA routing):

https://www.MYDOMAIN.com/auth/providers/.../login
https://www.MYDOMAIN.com/graphql

2 - Use a different subdomain to provide both the auth and endpoint:

https://API.MYDOMAIN.com/auth/providers/.../login
https://API.MYDOMAIN.com/graphql

3 - Use a different but related domain for the auth and endpoint:

https://www.MYDOMAIN.NET/auth/providers/.../login
https://www.MYDOMAIN.NET/graphql

Thank you

Not currently but it has been requested on our feedback portal here - https://feedback.mongodb.com/forums/923521-realm/suggestions/40550605-ability-to-expose-api-via-our-own-custom-dns-entry

It may be addressed in a future initiative that looks to overhaul our exposed data api’s - stay tuned

1 Like

Thanks Ian is there a timeframe for the overhaul and if I develop against the existing data api will there be a way to migrate to the new api when they are ready?

Hey @mba_cat I can’t give you good timeline on this because we’re still in the planning phase, but I can post on this thread with any updates. If you’d like to give more specific feedback around GraphQL/APIs on Realm and anything you’d like to see in the service, you can shoot me an email at sumedha.mehta@mongodb.com

1 Like

Having a custom domain for realm http triggers is important for maintaining a good branded experience. users see the task bar when calls are made to third party services, best to be on a sub domain i.e. api.xxxx.com. Lambda and all other serverless function services allow for this, sadly we cant move to realm functions unless this happenes.