• Complain

Daniel Schmitz - Practical GraphQL

Here you can read online Daniel Schmitz - Practical GraphQL full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, publisher: leanpub.com, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    Practical GraphQL
  • Author:
  • Publisher:
    leanpub.com
  • Genre:
  • Year:
    2020
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Practical GraphQL: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Practical GraphQL" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Daniel Schmitz: author's other books


Who wrote Practical GraphQL? Find out the surname, the name of the author of the book and a list of all author's works by series.

Practical GraphQL — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Practical GraphQL" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Practical GraphQL Daniel Schmitz This book is for sale at - photo 1
Practical GraphQL
Daniel Schmitz

This book is for sale at http://leanpub.com/book-graphql

This version was published on 2020-12-28

This is a Leanpub book Leanpub empowers authors and publishers with - photo 2

* * * * *

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.

* * * * *

2018 - 2020 Daniel Schmitz

About PIRACY

This work is not free and should not be published without authorization, specially on sites like scrib. Please contribute to the authors so they can invest in more quality content.

If you obtained this work without buying it, we ask you to read the ebook and, if you believe the book deserves it, buy it and help the author to publish more and more.

Thanks!!

Support

For support, you can open a issue on GitHub at the following address:

https://github.com/danielschmitz/gql-003-sales/issues

You can also suggest new chapters for this ebook.

Source Code

All the examples of this work are at GitHub, at the following address:

https://github.com/danielschmitz/gql-003-sales

Introduction

In this work we present GraphQL, which can be defined as A query language for your API. GraphQL contains a number of benefits compared to REST communication, present on most Web systems today, being its successor.

On a system that uses RESTful communication, we can list some common problems in the communication between the client and the server:

  • The frontend does not need all information that the backend provides, so anything that is not used is discarded. For example, an endpoint that returns all fields of a table, but at that time, the frontend only needs three fields. The solution in RESTful would be to create a new endpoint that returns the three fields. In GraphQL, the frontend will always inform the backend which fields should be returned.
  • If the frontend requires several information to compose a screen, it must make several requests to the RESTful backend. For example, a product screen needs to display information about the product category, its supplier and last sales. The solution in RESTful would be to access multiple endpoints or create a new endpoint that returns all this information together. In GraphQL, it is possible to return several information at the same time, only in one request.

Only these two examples are enough for the GraphQL to be superior to RESTful, but there are a number of other cases that will be discussed throughout this work.

1.1 How this work is organized

The focus of this work is the creation of a web/mobile system using GraphQL. As we progress through the application, we will refer to some theoretical part that may possibly be available on the official GraphQL website.

Chapter 1 presents an introduction to GraphQL, commenting on some important concepts and defining the technologies that will be used in the course of the work.

In chapter 2 you will install everything that is necessary to develop a GraphQL application.

Chapter 3 addresses the project creation and the basic configuration of GraphQL in the backend.

Chapter 4 addresses the project creation and the basic configuration of GraphQL in the frontend.

In chapter 5, the authentication is added to the system, with a registration, login and logout form.

In the chapter 6 we will modularize the backend server code, so that we can extend the application in an organized way.

In the chapter 7 we will deploy the application on the Heroku server.

In chapter 8 we will add the category screen.

In chapter 9 we will add the supplier screen. This chapter presents how to create a one to one relation in the graphql.

In chapter 10 we will add the customer, employee and shipper screens.

In chapter 11 we will add the product screen.

In chapter 12 we will add the order screen.

1.2 Technologies employed

To Create a web system, it is necessary to define a set of technologies that meet each part of the application:

  • The backend will be on Node and the web server will be Express. The database will be sqlite (postgreSQL at production server), and to query the database, we will use a query builder called knex.
  • The frontend will be on Vue.js, a simple yet complete framework for web application development. We will use Bulma to draw the interface. Even if you work with Angular or React, the use of Vue will be minimal and will allow a full understanding of the functioning de GraphQL.
1.3 Tables

The following image shows the diagram of tables and relationships of the system to be developed.

The following diagram displays a summary of the transactions that will be - photo 3

The following diagram displays a summary of the transactions that will be performed in the system. For example, a product has a category, a vendor has products, a sale is sold by the employee and purchased by the customer.

Installation It takes very little to start learning GraphQL In this work we - photo 4
Installation

It takes very little to start learning GraphQL. In this work, we will use Node on the backend and Vue.js on the frontend. GraphQL supports several technologies which can be accessed at this link. We will use as text editor Visual Studio Code.

If you do not have Git, go to https://git-scm.com/ and install it. Go to https://nodejs.org/en/ and install Node (LTS version). After installing these two programs, you can access git bash by Windows, which is the terminal that we will use to execute various commands during this work. If you are using Linux, you can use the systems own terminal.

To check these installations, run the following commands:

$ git --versiongit version 2.23.0.windows.1$ node -vv14.2$ npm -v 6.14.4

To install Visual Studio Code, go to https://code.visualstudio.com/. After installing vscode, click the extensions tab and install the following extensions: editorconfig, GraphQL for VSCode, ESLint, Vetur. This is the minimum set of extensions that we will need.

Some Node applications need to be installed globally. Among them we have knex, Vue, eslint and nodemon. To install these packages, run the following command:

$ npm install -g @vue/cli knex eslint nodemon
Backend project
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Practical GraphQL»

Look at similar books to Practical GraphQL. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Practical GraphQL»

Discussion, reviews of the book Practical GraphQL and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.