24. PostGraphQL server listening on port 5000 🚀
‣ Connected to Postgres instance postgres://localhost:5432
‣ Introspected Postgres schema(s) public
‣ GraphQL endpoint served at http://localhost:5000/graphql
‣ GraphiQL endpoint served at http://localhost:5000/graphiql
postgraphql --watch
yarn global add postgraphql
37. CREATE ROLE 'editor';
GRANT ALL ON articles TO editor;
CREATE ROLE 'viewer';
GRANT SELECT ON articles TO viewer;
38. id title status
1 Reederei Rickmers kündigt… PUBLISHED
2 Trump will Entscheidung… DRAFT
3 Protest gegen Abschiebung… DEPUBLISHED
4 FC Bayern wird Deutscher… SCHEDULED
39. SET row_security = on;
CREATE POLICY published ON articles
FOR SELECT TO viewer
USING status = 'PUBLISHED';