Muutke küpsiste eelistusi

Fullstack GraphQL Applications with GRANDstack [Pehme köide]

  • Formaat: Paperback / softback, 300 pages, kõrgus x laius x paksus: 234x184x16 mm, kaal: 460 g
  • Ilmumisaeg: 22-Sep-2022
  • Kirjastus: Manning Publications
  • ISBN-10: 1617297038
  • ISBN-13: 9781617297038
Teised raamatud teemal:
  • Formaat: Paperback / softback, 300 pages, kõrgus x laius x paksus: 234x184x16 mm, kaal: 460 g
  • Ilmumisaeg: 22-Sep-2022
  • Kirjastus: Manning Publications
  • ISBN-10: 1617297038
  • ISBN-13: 9781617297038
Teised raamatud teemal:
GraphQL radically improves the efficiency of web APIs, reducing the number of requests and the volume of data in-transit within your web applications. You can amplify the benefits of GraphQL by adjusting your stack to match GraphQLs more natural representation of your data as a graph. In   Fullstack GraphQL Applications with GRANDstack  youll learn to build graph-aware end-to-end web applications using GraphQL, React, Apollo, and the Neo4j graph database. about the technologyOver-fetching or under-fetching data from REST APIs makes your applications slow and unreliable, especially over weak mobile network connections. The GraphQL query language offers a solution with a new API paradigm, reducing loads by constructing precise graph-based data requests. By adapting your applications design and data store to leverage graphs throughout the stack, you decrease friction by using a consistent data model improving developer productivity, performance and maintainability. The combination of GraphQL, React, Apollo, and Neo4j Database, aka the GRANDstack, provides an easily adoptable end-to-end solution perfect for building fullstack GraphQL applications. about the book Fullstack GraphQL Applications with GRANDstack  teaches you to leverage the power of GraphQL to create modern APIs that streamline data loads by allowing client applications to selectively fetch only the data required. GRANDstack.io contributor and GraphQL Foundation member William Lyon teaches you everything you need to know to design, deploy, and maintain a GraphQL API from scratch and create graph-aware fullstack web applications. In this project-driven book, youll build a complete business reviews application using the cutting-edge GRANDstack, learning how the different parts fit together. Chapter-by-chapter, youll master creating a GraphQL service with Apollo Server, modelling a GraphQL API with GraphQL type definitions, installing the Neo4j Database on different platforms, and more. By the time youre done, youll be able to deploy all of the components of a serverless fullstack application in a secure and cost-effective way that takes full advantage of GraphQLs performance capabilities. Along the way, youll also get tips for applying these techniques to other stacks.   what's inside

Building the backend functionality of a GraphQL application Handling authentication and authorization with GraphQL Implementing pagination and rate limiting in a GraphQL API Create a basic frontend application using React and Apollo Client

about the readerAimed at developers comfortable building web applications using tools like Django, Rails, or MEAN stack and standard SQL-based databases. No experience with GraphQL or graph databases required. about the author William Lyon  is a software developer at Neo4j, working on integrations with other technologies and helping users build applications with Neo4j. He is the creator and maintainer of neo4j-graphql.js, a JavaScript library for creating GraphQL APIs, and is a contributor to GRANDstack.io. He serves as Neo4js representative on the GraphQL Foundation.
preface xi
acknowledgments xii
About this book xiii
About the author xvi
About the cover illustration xvii
Part 1 Getting started with fuel stack GraphQL
1(98)
1 What is full stack GraphQL?
3(26)
1.1 A look at full stack GraphQL
3(2)
1.2 GraphQL
5(10)
GraphQL type definitions
5(2)
Querying with GraphQL
7(3)
Advantages of GraphQL
10(2)
Disadvantages of GraphQL
12(1)
GraphQL tooling
13(2)
1.3 React
15(3)
React components
16(1)
JSX
16(1)
React tooling
16(2)
1.4 Apollo
18(1)
Apollo Server
18(1)
Apollo Client
18(1)
1.5 Neo4j Database
18(5)
Property graph data model
19(1)
Cypher query language
19(1)
Neo4j tooling
20(3)
1.6 How it all fits together
23(4)
React and Apollo Client: Making the request
24(1)
Apollo Server and GraphQL backend
25(1)
React and Apollo Client: Handling the response
26(1)
1.7 What we will build in this book
27(1)
1.8 Exercises
28(1)
2 Graph thinking with GraphQL
29(20)
2.1 Your application data is a graph
30(1)
2.2 Graphs in GraphQL
31(10)
API modeling with type definitions: GraphQL-first development
31(6)
Resolving data with resolvers
37(1)
Our first resolver
38(3)
2.3 Combining type definitions and resolvers with Apollo Server
41(6)
Using Apollo Server
41(1)
Apollo Studio
42(1)
Implementing resolvers
43(3)
Querying using Apollo Studio
46(1)
2.4 Exercises
47(2)
3 Graphs in the database
49(18)
3.1 Neo4j overview
50(1)
3.2 Graph data modeling with Neo4j
50(4)
The property graph model
51(3)
Database constraints and Indexes
54(1)
3.3 Data modeling considerations
54(1)
Node vs. property
54(1)
Node vs. relationship
55(1)
Indexes
55(1)
Specificity of relationship types
55(1)
Choosing a relationship direction
55(1)
3.4 Tooling: Neo4j desktop
55(1)
3.5 Tooling: Neo4j Browser
56(1)
3.6 Cypher
57(8)
Pattern matching
57(1)
Properties
58(1)
CREATE
58(4)
MERGE
62(1)
Defining database constraints with cypher
63(1)
MATCH
64(1)
Aggregations
65(1)
3.7 Using the Neo4j client drivers
65(1)
3.8 Exercises
66(1)
4 The Neo4j GraphQL Library
67(32)
4.1 Common GraphQL problems
68(1)
Poor performance and then + 1 query problem
68(1)
Boilerplate and developer productivity
69(1)
4.2 Introducing GraphQL database integrations
69(1)
4.3 The Neo4j GraphQL Library
69(7)
Project setup
70(4)
Generated GraphQL schema from type definitions
74(2)
4.4 Basic GraphQL queries
76(3)
4.5 Ordering and pagination
79(1)
4.6 Nested queries
80(2)
4.7 Filtering
82(4)
Where Argument
82(1)
Nested filter
82(1)
Logical operators: AND, OR
83(2)
Filtering in selections
85(1)
4.8 Working with temporal fields
86(2)
Using a Date type in queries
86(1)
Date and DateTime filters
87(1)
4.9 Working with spatial data
88(2)
The Point type in selections
88(1)
Distance filter
89(1)
4.10 Adding custom logic to our GraphQL API
90(6)
The @cypher GraphQL schema directive
90(4)
Implementing custom resolvers
94(2)
4.11 Introspecting GraphQL schema from an existing database
96(1)
4.12 Exercises
97(2)
Part 2 Building the frontend
99(38)
5 Building user interfaces with React
101(15)
5.1 React overview
102(2)
JSX and React elements
103(1)
React components
103(1)
Component hierarchy
104(1)
5.2 Create React App
104(6)
Creating a React application with Create React App
104(6)
5.3 State and React Hooks
110(4)
5.4 Exercises
114(2)
6 Clientrside GraphQL with React and Apollo Client
116(21)
6.1 Apollo Client
117(12)
Adding Apollo Client to our React Application
117(3)
Apollo Client hooks
120(4)
GraphQL variables
124(1)
GraphQL fragments
125(2)
Caching with Apollo Client
127(2)
6.2 GraphQL mutations
129(3)
Creating nodes
129(1)
Creating relationships
130(1)
Updating and deleting
131(1)
6.3 Client state management with GraphQL
132(4)
Local-only fields and reactive variables
132(4)
6.4 Exercises
136(1)
Part 3 Full stack considerations
137(100)
7 Adding authorization and authentication
139(33)
7.1 Authorization in GraphQL: A naive approach
140(3)
7.2 JSON Web Tokens
143(4)
7.3 The @auth GraphQL schema directive
147(10)
Rules and operations
148(1)
The isAuthenticated authorization rule
149(2)
The roles authorization rule
151(2)
The allow authorization rule
153(1)
The where authorization rule
154(2)
The bind authorization rule
156(1)
7.4 Auth(): JWT as a service
157(14)
Configuring Auth()
157(4)
Auth() React
161(10)
7.5 Exercises
171(1)
8 Deploying our full stack GraphQL application
172(40)
8.1 Deploying our full stack GraphQL application
173(2)
Advantages of this deployment approach
173(1)
Disadvantages of our deployment approach
174(1)
Overview of our approach to full stack GraphQL
174(1)
8.2 Neo4j Aura database as a service
175(11)
Creating a Neo4j Aura cluster
175(3)
Connecting to a Neo4j Aura cluster
178(3)
Uploading data to Neo4j Aura
181(2)
Exploring the graph with Neo4j Bloom
183(3)
8.3 Deploying a React application with Netlify Build
186(16)
Adding a site to Netlify
187(9)
Setting environment variables for Netlify builds
196(3)
Netlify deploy previews
199(3)
8.4 Serverless GraphQL with AWS Lambda and Netlify Functions
202(8)
Serving a GraphQL API as a Lambda function
202(2)
The Netlify dev CLI
204(1)
Converting our GraphQL API to a Netlify function
205(2)
Adding a custom domain in Netlify
207(3)
8.5 Our deployment approach
210(1)
8.6 Exercises
211(1)
9 Advanced GraphQL considerations
212(25)
9.1 GraphQL abstract types
213(13)
Interface types
213(1)
Union types
214(1)
Using abstract types with the Neo4j GraphQL library
215(11)
9.2 Pagination with GraphQL
226(5)
Offset pagination
226(1)
Cursor pagination
227(4)
9.3 Relationship properties
231(3)
Interfaces and the @relationship GraphQL schema directive
232(1)
Creating relationship properties
233(1)
9.4 Wrapping up Full Stack GraphQL
234(1)
9.5 Exercises
235(2)
Index 237