077097b7f8
* Add licences to all example/package.json that lack them * Revert "Add licences to all example/package.json that lack them" This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba. * Update check-examples to remove `license` field from examples * Remove `license` from all examples. This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge? Co-authored-by: JJ Kasper <jj@jjsweb.site> |
||
---|---|---|
.. | ||
lib | ||
pages | ||
.env | ||
.gitignore | ||
package.json | ||
README.md |
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:
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:
- Link a cluster that includes the Atlas sample data sets
- Configure permissions for the
sample_mflix.movies
collection. For this demo, you can assign ready only permissions for all authenticated users. - 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". - Enable anonymous authentication
- Once your app is set up, replace the value of NEXT_PUBLIC_REALM_APP_ID in
.env
file with your App ID