Skip to content

Commit fd055d0

Browse files
authored
Add section why GraphQL is *cool* (#3606)
1 parent 7572e0d commit fd055d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/docs/querying-with-graphql.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ components](/docs/building-with-components/) to declare what data they and their
1919
sub-components need. Then, Gatsby makes that data available in
2020
the browser when needed by your components.
2121

22+
## Why is GraphQL so cool?
23+
24+
* Eliminate frontend data boilerplate — no need to worry about requesting & waiting for data. Just ask for the data you need with a GraphQL query and it'll show up when you need it
25+
* Push frontend complexity into queries — many data transformations can be done at *build-time* within your GraphQL queries
26+
* It's the perfect data querying language for the often complex/nested data dependencies of modern applications
27+
* Improve performance by removing data bloat — GraphQL is a big part of why Gatsby is so fast as it enables lazy-loading the exact data in the exact form each view needs
28+
2229
## What does a GraphQL query look like?
2330

2431
GraphQL lets you ask for the exact data you need. Queries look like JSON:
@@ -185,6 +192,7 @@ export const query = graphql`
185192
}
186193
}
187194
`;
195+
```
188196
189197
See also the following blog posts:
190198

0 commit comments

Comments
 (0)