hasura/graphql-engine

docs: examples of mutation by anonymous role

Open

#308 opened on Aug 24, 2018

View on GitHub
 (5 comments) (0 reactions) (1 assignee)TypeScript (2,787 forks)batch import
c/docshelp wanted

Repository metrics

Stars
 (31,371 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

There are quite a few common use-cases around capturing mutations from anonymous users but without making it too easy for malicious users to spam the backend.

  1. Likes or visit counter
  2. other examples

Reasonable ways to determine a unique anonymous user:

  1. client generated session-id. Possible con: not terribly hard for a sophisticated user to fake
  2. IP based value. Possible con: users on a campus network might have UX issues with their likes getting rejected
  3. recaptcha based value. Possible con: ugh UX

(Via @thangngoc and @7777 on discord)

Contributor guide