Skip to content

Prisma, GraphQL, ReactJS, PostgreSQL with AWS: Amplify, Elastic Beanstalk, RDS

Notifications You must be signed in to change notification settings

nuuxcode/graphql-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Notes App

chrome_HXUayeTEKe

Demo and API URLs

chrome_PrPUlKK30N

Tech Stack

This project is built using the following technologies:

  • Prisma: Next-generation Node.js and TypeScript ORM. Prisma helps you build efficient, reliable and scalable applications.
  • GraphQL: A query language for APIs and a runtime for executing those queries with your existing data.
  • ReactJS: A JavaScript library for building user interfaces.
  • PostgreSQL: A powerful, open source object-relational database system.

These technologies provide a robust and scalable platform for our GraphQL Notes API.

image

AWS Services

This project is hosted and managed using the following AWS services:

  • AWS Amplify: Used for hosting the demo of the application. AWS Amplify makes it easy to create, configure, and implement scalable mobile and web apps powered by AWS.
  • AWS Elastic Beanstalk: Used for deploying and managing the GraphQL API. AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services.
  • AWS RDS: Used for hosting the PostgreSQL database. Amazon RDS makes it easy to set up, operate, and scale a relational database in the cloud.

These AWS services provide a robust and scalable platform for our GraphQL Notes API.

GraphQL Notes API

This API allows you to perform CRUD operations on notes using GraphQL. Below are some example queries and mutations you can use.

Queries

Show All Notes

To fetch all notes, use the following query:

query {
  notes {
    id
    title
    content
  }
}

Show Note by ID

To fetch a note by its ID, use the following query (replace 2 with your desired ID):

query {
  note(id:2) {
    id
    title
    content
  }
}

Search Notes by String

To search notes by a string, use the following query (replace "your search string" with your desired search string):

query {
  searchNotes(searchString: "your search string") {
    id
    title
    content
  }
}

Mutations

Update Note

To update a note, use the following mutation (replace 1 with your desired ID and "New Title" and "New Content" with your desired title and content):

mutation {
  updateNote(id: 1, data: { title: "New Title", content: "New Content" }) {
    id
    title
    content
  }
}

Delete Note

To delete a note, use the following mutation (replace 1 with your desired ID):

mutation {
  deleteNote(id: 1) {
    id
  }
}