Skip to content

gungorugur/graphql-bff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Simple implementation of Backend For Frontend pattern using by graphql

Install dependencies

yarn install

Start project in development mode

yarn start-dev

Example Query

Get product detail and its comments in single query

query {
  product(id :1) {id, name , description, code, quantity, price},
  comments(productId:1) {
    comment
  }
}

Example Response

{
  "data": {
    "product": {
      "id": 1,
      "name": "Cotton Shirt",
      "description": "Blue shirt",
      "code": "a234bz",
      "quantity": 5,
      "price": 10
    },
    "comments": [
      {
        "comment": "Beautiful"
      },
      {
        "comment": "Good!"
      },
      {
        "comment": "Not bad"
      }
    ]
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published