Sign in
Log inSign up

AWS Setup for React

Nino's photo
Nino
·Dec 13, 2018

Hi,

I recently programmed a react native app with firebase as a backend. I really enjoyed the concept of microservices but found some limitations at firebase, mainly geo-queries and scalability within their real-time database.

So I found Amazon Web Services as a perfect solution to all my problems with firebase.

The Service I am talking about is called AppSync. It has a nice library for default API calls - Amplify.

So after I started out to understand the main features and conzepts of AppSync I found a really challaging problem. I want to use GraphQL as a single source of truth but restrict access to some queries.

As an example let’s talk about I would like to rebuild hashnode. Where I would like that the query „listPosts“ is completely public and you can read posts without authenticating. But for all other queries like „answerPost“ or „commentPost“ it would require authentication.

How can I build this functionality when I am using AWS Cognito for authentication?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct