Example: Global Data

The simplest sync rules are for "global" data — synced to all users.

For example, put the following sync rules in your sync-rules.yaml:

      # Sync all todos
      - SELECT * FROM todos
      # Sync all lists except archived ones
      - SELECT * FROM lists WHERE archived = false

Note: Table names within sync rules must match the names defined in the client-side schema.

Last updated