rsnext/examples/with-realm-web
2021-04-19 21:53:32 -05:00
..
lib update with-realm-web example (#24241) 2021-04-19 21:53:32 -05:00
pages [Fix] common misspelling errors (#15288) 2020-07-19 04:38:20 +00:00
.env Example with Monogdb ReamlWeb (#14555) 2020-06-30 09:50:44 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
README.md Update .now.sh to .vercel.app. (#22359) 2021-04-14 09:46:06 -05:00

Realm-Web SDK Example

This example uses Realm-Web SDK to query a realm graphql endpoint using swr.

This example relies on MongoDB Realm for its GraphQL backend.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-realm-web with-realm-web-app
# or
yarn create next-app --example with-realm-web with-realm-web-app

Deploy it to the cloud with Vercel (Documentation).

Configuration

To set up your app:

  1. Link a cluster that includes the Atlas sample data sets
  2. Configure permissions for the sample_mflix.movies collection. For this demo, you can assign ready only permissions for all authenticated users.
  3. Generate a collection schema for the sample_mflix.movies collection. Add a root-level "title" field to the schema with the value set to "movie".
  4. Enable anonymous authentication
  5. Once your app is set up, replace the value of NEXT_PUBLIC_REALM_APP_ID in .env file with your App ID