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 - Ability to expose API via our own custom DNS entry – MongoDB Feedback Engine

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.

1 Like

Hi @Sumedha_Mehta1 has the planning phase completed ? Any timelines on when this will be available ?

Hi all, bumping this thread as it seems there will be quite a few reverse proxies out there to handle this need. It would be great to understand if this is planned for or if we need to plan for a workaround with a reverse proxy ourselves. Cheers

Hi Andy, would be great if you can document how you did this with a reverse proxy?