Skip to content

Instantly share code, notes, and snippets.

@dupski
Last active May 19, 2018 23:26
Show Gist options
  • Save dupski/42c5d40bd0a6261596a143ab71579def to your computer and use it in GitHub Desktop.
Save dupski/42c5d40bd0a6261596a143ab71579def to your computer and use it in GitHub Desktop.
Create a GraphQL API in 5 minutes - API
import { ModelApiManager } from 'rev-api';
// Register model classes with an API Manager
export const api = new ModelApiManager(modelManager);
api.register(User, { operations: ['read', 'create'] })
api.register(Post, { operations: ['read', 'create', 'update', 'remove'] })
api.register(Comment, { operations: ['read', 'create', 'update', 'remove'] })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment