Hands-On Full-Stack Web Development with GraphQL and React : Build Scalable Full-Stack Applications While Learning to Solve Complex Problems with GraphQL.
Combining React, one of the most widely used JavaScript frameworks, and GraphQL, the modern way of querying an API, two revolutionary technologies will give you a future-proof and scalable stack you can start building your business around. This book will guide you in implementing applications by usi...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing Ltd,
2019.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Title Page; Copyright and Credits; www.PacktPub.com; Contributors; Table of Contents; Preface; Chapter 1: Preparing Your Development Environment; Application architecture; The basic setup; Installing and configuring Node.js; Setting up React; Preparing and configuring webpack; Render your first React component; Rendering arrays from React state; CSS with webpack; Event handling and state updates with React; Controlling document heads with React Helmet; Production build with webpack; Useful development tools; Analyzing bundle size; Summary; Chapter 2:Setting up GraphQL with Express.js
- Node.js and Express.jsSetting up Express.js; Running Express.js in development; Routing in Express.js; Serving our production build; Using Express.js middleware; Installing important middleware; Express Helmet; Compression with Express.js; CORS in Express.js; Combining Express.js with Apollo; Writing your first GraphQL schema; Implementing GraphQL resolvers; Sending GraphQL queries; Using multiples types in GraphQL schemas; Writing your first GraphQL mutation; Back end debugging and logging; Logging in Node.js; Debugging with Postman; Summary; Chapter 3: Connecting to The Database
- Using databases in GraphQLInstalling MySQL for development; Creating a database in MySQL; Integrating Sequelize into our stack; Connecting to a database with Sequelize; Using a configuration file with Sequelize; Writing database models; Your first database model; Your first database migration; Importing models with Sequelize; Seeding data with Sequelize; Using Sequelize with Apollo; Global database instance; Running the first database query; One-to-one relationships in Sequelize; Updating the table structure with migrations; Model associations in Sequelize; Seeding foreign key data
- Mutating data with SequelizeMany-to-many relationships; Model and migrations; Chat model; Message model; Chats and messages in GraphQL; Seeding many-to-many data; Creating a new chat; Creating a new message; Summary; Chapter 4: Integrating React into the Back end with Apollo; Setting up Apollo Client; Installing Apollo Client; Testing the Apollo Client; Binding the Apollo Client to React; Using the Apollo Client in React; Querying in React with the Apollo Client; Apollo HoC query; The Apollo Query component; Mutations with the Apollo Client; The Apollo Mutation HoC
- The Apollo Mutation componentUpdating the UI with the Apollo Client; Refetching queries; Updating the Apollo cache; Optimistic UI; Polling with the Query component; Implementing chats and messages; Fetching and displaying chats; Fetching and displaying messages; Sending messages through Mutations; Pagination in React and GraphQL; Debugging with the Apollo Client Developer Tools; Summary; Chapter 5: Reusable React Components; Introducing React patterns; Controlled components; Stateless functions; Conditional rendering; Rendering child components; Structuring our React application