From 6c8749b8e3e90802ed7983ef9c3cf48af9b2b1ff Mon Sep 17 00:00:00 2001 From: carolstran Date: Wed, 14 Oct 2020 19:41:15 +0200 Subject: [PATCH 1/9] Replace 7/10 cupcakes with answers --- src/content/faq/General.md | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index 650423503f..b88888fdc7 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -21,39 +21,31 @@ Sugar plum gummies donut cheesecake marshmallow donut caramels. Chocolate cake j ## Does GraphQL replace REST? - +No, not necessarily. They both handle APIs and [serve the same purpose](/learn/thinking-in-graphs/#business-logic-layer) from a business perspective. GraphQL is considered an alternative to REST, but it’s not a definitive replacement. -Jelly-o cupcake marshmallow marshmallow. Lemon drops cake caramels donut halvah cupcake topping tootsie roll. Jelly cotton candy candy cheesecake danish [jelly-o icing bonbon](). +GraphQL and REST can actually co-exist in your stack. For example, you can abstract REST APIs behind a [GraphQL server](/code/#server-libraries) or mask your REST endpoint into a GraphQL endpoint using [resolvers](/learn/execution/#root-fields-resolvers). For an opinionated perspective on how GraphQL compares to REST, check out [How To GraphQL](https://www.howtographql.com/basics/1-graphql-is-the-better-rest/). ## How can I learn GraphQL? - - -[Gummies lollipop chocolate dragée liquorice.]() Pastry marzipan pie sugar plum halvah topping halvah soufflé marzipan. Biscuit liquorice marshmallow. +There are many resources available to help you learn GraphQL, including this website. In [our documentation](/learn/), you’ll find a series of articles that explain essential GraphQL concepts and how they work. Our [Community page](/community) is full of resources to reference and groups to join. -Pie gummies apple pie marzipan halvah cotton candy toffee tootsie roll oat cake. Brownie pudding pastry candy chupa chups liquorice bear claw pudding jujubes. Pie jelly liquorice dessert sweet roll bonbon. Danish macaroon cupcake jelly beans liquorice brownie dessert muffin candy canes. +For more practical guides, you can visit the [How to GraphQL](https://www.howtographql.com/) fullstack tutorial website. We also have a free online course with edX, [Exploring GraphQL: A Query Language for APIs](https://www.edx.org/course/exploring-graphql-a-query-language-for-apis). ## Is GraphQL frontend or backend? - - -Brownie candy jelly candy wafer cake macaroon I love. Pastry I love jelly beans powder carrot cake wafer chocolate gingerbread soufflé. I love dragée I love macaroon sugar plum topping icing cotton candy. Chupa chups [powder wafer](). +Neither. Instead, it’s [how you can exchange information between the two](https://www.howtographql.com/basics/3-big-picture/). Both the client and the server should understand and communicate through the GraphQL specification. ## Does GraphQL replace Redux or other state management libraries? - - -Sweet roll candy danish cupcake bonbon biscuit. Jelly-o soufflé chocolate cake fruitcake cookie croissant ice cream tart. +No, GraphQL isn’t a state management library - but it can reduce the need for one. -Cupcake soufflé sweet roll cake fruitcake caramels pastry pie. Dragée donut icing pudding ice cream cake cheesecake lemon drops. Apple pie icing tart topping jelly beans sweet marshmallow. Oat cake chocolate lollipop brownie sesame snaps croissant cupcake. Gummies jelly-o chocolate cake chocolate bar. Oat cake sweet powder jelly. +One benefit of state management libraries like Redux is that they can manipulate API responses into a format that your application understands. With GraphQL, you have control over [what data you request](/learn/queries/#fields) and [how that data is formatted](/learn/execution/). So this benefit is already built-in. Many [client libraries](https://graphql.org/code/#graphql-clients) can also be used to manage state and have features like caching built-in. You may still decide to implement a state management library, but using it to format response data won’t be necessary. ## Is GraphQL only for React or JavaScript developers? - - -Jelly pastry pudding jelly beans candy canes. Carrot cake sesame snaps chocolate cake topping cotton candy sesame snaps cake. Tart cheesecake gummies. Sugar plum apple pie ice cream danish tootsie roll. Chocolate brownie cake lemon drops lemon drops. Brownie chupa chups caramels pastry. Donut bear claw chocolate cake. Candy canes jujubes cake apple pie pudding gummies tootsie roll tootsie roll. [Jujubes cake liquorice.]() Pastry apple pie chocolate icing cake jelly-o. Cookie [cheesecake soufflé]() cake cheesecake tart liquorice. Cake donut jelly beans [bonbon soufflé croissant](). Soufflé tart chocolate cake cake jelly-o dessert. +No, not at all. [GraphQL services can be written in any language](/learn/schema/#type-language). Our [Code page](/code/) contains a long list of libraries available to help with that. -Candy danish cupcake topping donut jujubes dragée dessert cotton candy. Sweet roll lollipop tootsie roll gummi bears. Fruitcake powder dessert gummies. Icing I love danish pudding cake. +It’s understandable why you’d think this, though. GraphQL was introduced at a [React conference](https://www.youtube.com/watch?v=9sc8Pyc51uU) and [GraphQL.js](/graphql-js/) is one of the most widely used reference implementations to date. We know this can be confusing, so we’re working to improve our documentation and add more code samples that aren’t written in JavaScript. ## What is a GraphQL client and why would I use one? @@ -63,16 +55,10 @@ Powder powder chocolate cake cookie bear claw. Marshmallow gummi bears sweet rol ## What is the GraphQL Foundation? - - -[Chupa chups gummies I love.]() +The [GraphQL Foundation](https://foundation.graphql.org/faq/) provides governance for GraphQL as well as vendor-neutral oversight of funding, events, operations resources, and more. It was formed in 2018 by [various tech companies](https://landscape.graphql.org/category=graph-ql-foundation-member&format=logo-mode) and hosted under the [Linux Foundation](https://www.linuxfoundation.org/). The idea is that it’s an open, neutral home for the GraphQL community. -Gummies marzipan dessert lemon drops muffin. Chocolate chocolate bar fruitcake toffee powder I love gummies. Donut tart cheesecake. Lollipop sweet roll apple pie I love. Pie candy canes jelly macaroon. Biscuit sugar plum chocolate bar cupcake pudding cake sugar plum bear claw. Cheesecake chocolate I love jelly beans I love tiramisu. Chocolate cake biscuit caramels halvah cotton candy pie. Gingerbread powder candy carrot cake jelly I love. Dessert I love chupa chups caramels lollipop candy canes gingerbread I love gummi bears. - -Fruitcake lollipop danish cheesecake liquorice cookie cheesecake toffee oat cake. +You can find out more by visiting [foundation.graphql.org](https://foundation.graphql.org/). ## How can I contribute to the GraphQL specification? - - -Carrot cake tootsie roll ice cream candy canes bonbon. Pudding macaroon I love danish dragée tart biscuit. [Biscuit cake wafer.]() \ No newline at end of file +GraphQL is still an evolving language and contributions are very welcome! The specification (including the [latest working draft](https://spec.graphql.org/)) is open source and [contributor guidelines](https://github.com/graphql/graphql-spec/blob/master/CONTRIBUTING.md) are available on GitHub. \ No newline at end of file From 0daace0679fb6e4d9f7c2281c583413ba2b02a43 Mon Sep 17 00:00:00 2001 From: carolstran Date: Mon, 19 Oct 2020 00:52:41 +0200 Subject: [PATCH 2/9] Add database answer --- src/content/faq/General.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index b88888fdc7..e5fe5f2d1b 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -15,9 +15,11 @@ Soufflé candy lollipop [dragée cake chocolate](). Marzipan lemon drops sweet r ## Is GraphQL a database language like SQL? - +No, but this is a common misconception. GraphQL is designed for APIs, not databases. It’s a specification for how to request data and it determines how that data is communicated between servers and clients. + +GraphQL is frequently used for database interactions though. For example, it can be built into a wrapper around a database or a [GraphQL server](/code/#server-libraries) can query various databases. There are also [services](/code/#services) that implement the GraphQL specification and then allow clients to use GraphQL to query that data source. But it can also be used without a database at all. -Sugar plum gummies donut cheesecake marshmallow donut caramels. Chocolate cake jelly beans ice cream halvah topping lemon drops liquorice croissant. Jelly-o chocolate gummies chocolate I love toffee danish sweet roll. Marzipan I love I love jujubes cupcake bear claw. Soufflé caramels caramels marzipan icing macaroon. Tootsie roll I love jelly beans halvah sweet donut fruitcake. Icing gummi bears tart marshmallow biscuit candy. Candy canes cotton candy soufflé muffin chocolate cake sweet. Candy canes dragée tiramisu gummies danish gummies gingerbread sugar plum gummies. +For more information on how to get GraphQL to interact with your database, check out our [documentation on resolvers](/learn/execution/#root-fields-resolvers). ## Does GraphQL replace REST? From f6390065acbb626a893d7346f6ba9eeaf4d9cd87 Mon Sep 17 00:00:00 2001 From: carolstran Date: Mon, 19 Oct 2020 23:16:49 +0200 Subject: [PATCH 3/9] Applied first round of Ivan's feedback --- src/content/faq/General.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index e5fe5f2d1b..342bea139e 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -15,7 +15,7 @@ Soufflé candy lollipop [dragée cake chocolate](). Marzipan lemon drops sweet r ## Is GraphQL a database language like SQL? -No, but this is a common misconception. GraphQL is designed for APIs, not databases. It’s a specification for how to request data and it determines how that data is communicated between servers and clients. +No, but this is a common misconception. GraphQL is designed for APIs, not databases. It’s a specification for how to request and modify data through an API layer. Then it determines how that data is communicated between servers and clients. GraphQL is frequently used for database interactions though. For example, it can be built into a wrapper around a database or a [GraphQL server](/code/#server-libraries) can query various databases. There are also [services](/code/#services) that implement the GraphQL specification and then allow clients to use GraphQL to query that data source. But it can also be used without a database at all. @@ -25,7 +25,9 @@ For more information on how to get GraphQL to interact with your database, check No, not necessarily. They both handle APIs and [serve the same purpose](/learn/thinking-in-graphs/#business-logic-layer) from a business perspective. GraphQL is considered an alternative to REST, but it’s not a definitive replacement. -GraphQL and REST can actually co-exist in your stack. For example, you can abstract REST APIs behind a [GraphQL server](/code/#server-libraries) or mask your REST endpoint into a GraphQL endpoint using [resolvers](/learn/execution/#root-fields-resolvers). For an opinionated perspective on how GraphQL compares to REST, check out [How To GraphQL](https://www.howtographql.com/basics/1-graphql-is-the-better-rest/). +GraphQL and REST can actually co-exist in your stack. For example, you can abstract REST APIs behind a [GraphQL server](/code/#server-libraries). This can be done by masking your REST endpoint into a GraphQL endpoint using [root resolvers](/learn/execution/#root-fields-resolvers). + +For an opinionated perspective on how GraphQL compares to REST, check out [How To GraphQL](https://www.howtographql.com/basics/1-graphql-is-the-better-rest/). ## How can I learn GraphQL? From 5d0b0c8de1d790237772049c346e645b93192546 Mon Sep 17 00:00:00 2001 From: carolstran Date: Tue, 20 Oct 2020 01:06:38 +0200 Subject: [PATCH 4/9] Add answer about GraphQL clients --- src/content/faq/General.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index 342bea139e..34870be5f3 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -53,9 +53,11 @@ It’s understandable why you’d think this, though. GraphQL was introduced at ## What is a GraphQL client and why would I use one? - +GraphQL clients can help you handle [queries and mutations](https://graphql.org/learn/queries/) to a [GraphQL server](https://graphql.org/code/#server-libraries). This could be done manually, but it would require a lot of work depending on the amount of data you have. By utilizing the underlying structure of a GraphQL API, clients can abstract away some of these tedious processes. Features that can be automated include batching, caching, UI updates, build-time schema validation, and many more. + +You can find a list of GraphQL clients in various languages on our [Code page](https://graphql.org/code/#graphql-clients). There’s also an [in-depth explanation of their benefits](https://www.howtographql.com/advanced/0-clients/) on How To GraphQL. -Powder powder chocolate cake cookie bear claw. Marshmallow gummi bears sweet roll. Apple pie fruitcake sweet roll tart candy canes chocolate. Gummi bears I love danish halvah tootsie roll sweet roll cupcake tootsie roll dessert. Gummies cake pastry tootsie roll. Carrot cake gingerbread marshmallow I love chocolate. +It takes more time to implement a GraphQL client upfront, but it becomes worth it the more features you need. You might want to start out using HTTP requests as the underlying transport layer (here’s [an example in JavaScript](https://graphql.org/graphql-js/graphql-clients/)), then switch to a more intricate client service as your application grows in complexity. ## What is the GraphQL Foundation? From 4ed400481ccf39cbb2ffc1f5fe1a8c31ce1c98af Mon Sep 17 00:00:00 2001 From: carolstran Date: Tue, 20 Oct 2020 13:16:06 +0200 Subject: [PATCH 5/9] Update client answer --- src/content/faq/General.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index 34870be5f3..b56c0b957e 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -57,7 +57,7 @@ GraphQL clients can help you handle [queries and mutations](https://graphql.org/ You can find a list of GraphQL clients in various languages on our [Code page](https://graphql.org/code/#graphql-clients). There’s also an [in-depth explanation of their benefits](https://www.howtographql.com/advanced/0-clients/) on How To GraphQL. -It takes more time to implement a GraphQL client upfront, but it becomes worth it the more features you need. You might want to start out using HTTP requests as the underlying transport layer (here’s [an example in JavaScript](https://graphql.org/graphql-js/graphql-clients/)), then switch to a more intricate client service as your application grows in complexity. +It takes more time to implement a GraphQL client upfront, but it becomes worth it the more features you need. You might want to start out [using HTTP requests](https://graphql.org/learn/serving-over-http/) as the underlying transport layer (here’s [an example in JavaScript](https://graphql.org/graphql-js/graphql-clients/)), then switch to a more intricate client service as your application grows in complexity. ## What is the GraphQL Foundation? From 42d7f00e35740b28dd518f0aaff191c2ade1212d Mon Sep 17 00:00:00 2001 From: carolstran Date: Tue, 20 Oct 2020 21:41:40 +0200 Subject: [PATCH 6/9] Add why GraphQL answer (finally) --- src/content/faq/General.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index b56c0b957e..3ab694803a 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -9,15 +9,24 @@ questions: Why should I use GraphQL?,Is GraphQL a database language like SQL?,Do ## Why should I use GraphQL? - +It depends on your use case, but in general, GraphQL has a few key features that stand out. For example, GraphQL enables you to: + +* Improve performance and stability by [sending queries](/learn/queries/) for the exact data you need. +* Aggregate data from [multiple UI clients](/learn/queries/#fragments) in [a single request](/learn/best-practices/#server-side-batching-caching ). +* Create a representation of your data that feels familiar and natural ([a graph](/learn/thinking-in-graphs/#it-s-graphs-all-the-way-down-https-en-wikipedia-org-wiki-turtles-all-the-way-down)). +* Ensure that all of your data is [statically typed](/learn/schema/) and these types inform [what queries the schema supports](/learn/introspection/). +* Examine queries and responses through community tools like [GraphiQL](https://github.com/graphql/graphiql). + +And many others! [Our homepage](/) outlines some more convincing reasons to use GraphQL. + +Additionally, it doesn’t take rewriting your entire application to try out GraphQL. You can even start with a single HTTP request that wraps an existing REST call, for instance. Your [GraphQL schema](/learn/thinking-in-graphs/#shared-language) and [business domain model](/learn/thinking-in-graphs/#business-logic-layer) can be expanded gradually, so we’d recommend focusing on one use case at first and only build the part of the schema you need for that to work. -Soufflé candy lollipop [dragée cake chocolate](). Marzipan lemon drops sweet roll I love cake ice cream muffin chupa chups gummi bears. Ice cream fruitcake I love sweet roll croissant ice cream. Gummi bears sesame snaps cake apple pie cake jelly. Gingerbread powder I love apple pie marzipan jelly beans sugar plum sesame snaps. Tiramisu chupa chups I love bear claw cake. Macaroon muffin topping ice cream bear claw cookie I love marshmallow. Pie gummies toffee candy pastry soufflé. Chupa chups toffee gummi bears I love cake lemon drops. ## Is GraphQL a database language like SQL? No, but this is a common misconception. GraphQL is designed for APIs, not databases. It’s a specification for how to request and modify data through an API layer. Then it determines how that data is communicated between servers and clients. -GraphQL is frequently used for database interactions though. For example, it can be built into a wrapper around a database or a [GraphQL server](/code/#server-libraries) can query various databases. There are also [services](/code/#services) that implement the GraphQL specification and then allow clients to use GraphQL to query that data source. But it can also be used without a database at all. +GraphQL is frequently used for database interactions though. For example, it can be built into a wrapper around a database or a [GraphQL server](https://www.howtographql.com/advanced/1-server/) can query various databases. There are also [services](/code/#services) that implement the GraphQL specification and then allow clients to use GraphQL to query that data source. But it can also be used without a database at all. For more information on how to get GraphQL to interact with your database, check out our [documentation on resolvers](/learn/execution/#root-fields-resolvers). @@ -25,7 +34,7 @@ For more information on how to get GraphQL to interact with your database, check No, not necessarily. They both handle APIs and [serve the same purpose](/learn/thinking-in-graphs/#business-logic-layer) from a business perspective. GraphQL is considered an alternative to REST, but it’s not a definitive replacement. -GraphQL and REST can actually co-exist in your stack. For example, you can abstract REST APIs behind a [GraphQL server](/code/#server-libraries). This can be done by masking your REST endpoint into a GraphQL endpoint using [root resolvers](/learn/execution/#root-fields-resolvers). +GraphQL and REST can actually co-exist in your stack. For example, you can abstract REST APIs behind a [GraphQL server](https://www.howtographql.com/advanced/1-server/). This can be done by masking your REST endpoint into a GraphQL endpoint using [root resolvers](/learn/execution/#root-fields-resolvers). For an opinionated perspective on how GraphQL compares to REST, check out [How To GraphQL](https://www.howtographql.com/basics/1-graphql-is-the-better-rest/). @@ -53,11 +62,11 @@ It’s understandable why you’d think this, though. GraphQL was introduced at ## What is a GraphQL client and why would I use one? -GraphQL clients can help you handle [queries and mutations](https://graphql.org/learn/queries/) to a [GraphQL server](https://graphql.org/code/#server-libraries). This could be done manually, but it would require a lot of work depending on the amount of data you have. By utilizing the underlying structure of a GraphQL API, clients can abstract away some of these tedious processes. Features that can be automated include batching, caching, UI updates, build-time schema validation, and many more. +GraphQL clients can help you handle [queries and mutations](/learn/queries/) to a [GraphQL server](https://www.howtographql.com/advanced/1-server/). This could be done manually, but it would require a lot of work depending on the amount of data you have. By utilizing the underlying structure of a GraphQL API, clients can abstract away some of these tedious processes. Features that can be automated include batching, caching, UI updates, build-time schema validation, and many more. -You can find a list of GraphQL clients in various languages on our [Code page](https://graphql.org/code/#graphql-clients). There’s also an [in-depth explanation of their benefits](https://www.howtographql.com/advanced/0-clients/) on How To GraphQL. +You can find a list of GraphQL clients in various languages on our [Code page](/code/#graphql-clients). There’s also an [in-depth explanation of their benefits](https://www.howtographql.com/advanced/0-clients/) on How To GraphQL. -It takes more time to implement a GraphQL client upfront, but it becomes worth it the more features you need. You might want to start out [using HTTP requests](https://graphql.org/learn/serving-over-http/) as the underlying transport layer (here’s [an example in JavaScript](https://graphql.org/graphql-js/graphql-clients/)), then switch to a more intricate client service as your application grows in complexity. +It takes more time to implement a GraphQL client upfront, but it becomes worth it the more features you need. You might want to start out [using HTTP requests](/learn/serving-over-http/) as the underlying transport layer (here’s [an example in JavaScript](/graphql-js/graphql-clients/)), then switch to a more intricate client service as your application grows in complexity. ## What is the GraphQL Foundation? From 87b08de8227c54f8c967a08e5c6db2d96b243b33 Mon Sep 17 00:00:00 2001 From: carolstran Date: Wed, 21 Oct 2020 22:37:16 +0200 Subject: [PATCH 7/9] Update based on Uri's review --- src/content/faq/General.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index 3ab694803a..14e731a9c0 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -56,7 +56,7 @@ One benefit of state management libraries like Redux is that they can manipulate ## Is GraphQL only for React or JavaScript developers? -No, not at all. [GraphQL services can be written in any language](/learn/schema/#type-language). Our [Code page](/code/) contains a long list of libraries available to help with that. +No, not at all. [GraphQL services can be written in any language](/learn/schema/#type-language). Our [Code page](/code/) contains a long list of libraries in many different programming languages to help with that. It’s understandable why you’d think this, though. GraphQL was introduced at a [React conference](https://www.youtube.com/watch?v=9sc8Pyc51uU) and [GraphQL.js](/graphql-js/) is one of the most widely used reference implementations to date. We know this can be confusing, so we’re working to improve our documentation and add more code samples that aren’t written in JavaScript. @@ -76,4 +76,6 @@ You can find out more by visiting [foundation.graphql.org](https://foundation.gr ## How can I contribute to the GraphQL specification? -GraphQL is still an evolving language and contributions are very welcome! The specification (including the [latest working draft](https://spec.graphql.org/)) is open source and [contributor guidelines](https://github.com/graphql/graphql-spec/blob/master/CONTRIBUTING.md) are available on GitHub. \ No newline at end of file +GraphQL is still an evolving language and contributions are very welcome! The specification (including the [latest working draft](https://spec.graphql.org/)) is open source and [contributor guidelines](https://github.com/graphql/graphql-spec/blob/master/CONTRIBUTING.md) are available on GitHub. + +There are more ways to get involved with GraphQL beyond the specification though. Updating the content on [this website and the documentation](https://github.com/graphql/graphql.github.io), for example. Or contributing to [graphql-js](https://github.com/graphql/graphql-js), [express-graphql](https://github.com/graphql/express-graphql), [GraphiQL](https://github.com/graphql/graphiql), or [one of the many other projects](https://github.com/graphql/) maintained by the [GraphQL Foundation](#what-is-the-graphql-foundation). \ No newline at end of file From 28e29fd8aa9979dd495438fc45350bc7470d3902 Mon Sep 17 00:00:00 2001 From: carolstran Date: Tue, 3 Nov 2020 00:01:47 +0100 Subject: [PATCH 8/9] Another round of reviews --- src/content/faq/General.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index 14e731a9c0..ffe44fb30b 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -12,9 +12,10 @@ questions: Why should I use GraphQL?,Is GraphQL a database language like SQL?,Do It depends on your use case, but in general, GraphQL has a few key features that stand out. For example, GraphQL enables you to: * Improve performance and stability by [sending queries](/learn/queries/) for the exact data you need. -* Aggregate data from [multiple UI clients](/learn/queries/#fragments) in [a single request](/learn/best-practices/#server-side-batching-caching ). +* Aggregate data from [multiple UI components](/learn/queries/#fragments) in [a single request](/learn/best-practices/#server-side-batching-caching ). * Create a representation of your data that feels familiar and natural ([a graph](/learn/thinking-in-graphs/#it-s-graphs-all-the-way-down-https-en-wikipedia-org-wiki-turtles-all-the-way-down)). * Ensure that all of your data is [statically typed](/learn/schema/) and these types inform [what queries the schema supports](/learn/introspection/). +* [Reduce the need for breaking changes](/learn/best-practices/#versioning), but utilize a [built-in mechanism for deprecations](https://spec.graphql.org/draft/#sec-Deprecation) when you need to. * Examine queries and responses through community tools like [GraphiQL](https://github.com/graphql/graphiql). And many others! [Our homepage](/) outlines some more convincing reasons to use GraphQL. @@ -24,7 +25,9 @@ Additionally, it doesn’t take rewriting your entire application to try out Gra ## Is GraphQL a database language like SQL? -No, but this is a common misconception. GraphQL is designed for APIs, not databases. It’s a specification for how to request and modify data through an API layer. Then it determines how that data is communicated between servers and clients. +No, but this is a common misconception. + +GraphQL is a specification for how to request and modify data. That data can be provided by [arbitrary functions](/learn/) and those functions can call APIs, databases, [local cache](/learn/caching/) or any representation of data. The main and most common use case is calling APIs. GraphQL is frequently used for database interactions though. For example, it can be built into a wrapper around a database or a [GraphQL server](https://www.howtographql.com/advanced/1-server/) can query various databases. There are also [services](/code/#services) that implement the GraphQL specification and then allow clients to use GraphQL to query that data source. But it can also be used without a database at all. @@ -62,7 +65,7 @@ It’s understandable why you’d think this, though. GraphQL was introduced at ## What is a GraphQL client and why would I use one? -GraphQL clients can help you handle [queries and mutations](/learn/queries/) to a [GraphQL server](https://www.howtographql.com/advanced/1-server/). This could be done manually, but it would require a lot of work depending on the amount of data you have. By utilizing the underlying structure of a GraphQL API, clients can abstract away some of these tedious processes. Features that can be automated include batching, caching, UI updates, build-time schema validation, and many more. +GraphQL clients can help you handle [queries, mutations,](/learn/queries/) and [subscriptions](https://spec.graphql.org/draft/#sec-Subscription) to a [GraphQL server](https://www.howtographql.com/advanced/1-server/). This could be done manually, but it would require a lot of work depending on the amount of data you have. By utilizing the underlying structure of a GraphQL API, clients can abstract away some of these tedious processes. Features that can be automated include batching, caching, UI updates, build-time schema validation, and many more. You can find a list of GraphQL clients in various languages on our [Code page](/code/#graphql-clients). There’s also an [in-depth explanation of their benefits](https://www.howtographql.com/advanced/0-clients/) on How To GraphQL. From c327ca74b2f130c8a3285ac00b2995c419091b4a Mon Sep 17 00:00:00 2001 From: carolstran Date: Tue, 3 Nov 2020 00:06:16 +0100 Subject: [PATCH 9/9] Update frontmatter for new Gatsby layout --- src/content/faq/General.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/faq/General.md b/src/content/faq/General.md index ffe44fb30b..f7d1139e23 100644 --- a/src/content/faq/General.md +++ b/src/content/faq/General.md @@ -1,8 +1,7 @@ --- title: Frequently Asked Questions (FAQ) -sidebarTitle: General -category: FAQ -layout: FAQLayout +layout: faq +category: General permalink: /faq/ questions: Why should I use GraphQL?,Is GraphQL a database language like SQL?,Does GraphQL replace REST?,How can I learn GraphQL?,Is GraphQL frontend or backend?,Does GraphQL replace Redux or other state management libraries?,Is GraphQL only for React or JavaScript developers?,What is a GraphQL client and why would I use one?,What is the GraphQL Foundation?,How can I contribute to the GraphQL specification? ---