From 2d46e58cb0a89f0321b03b8dd465420afc11d07d Mon Sep 17 00:00:00 2001 From: carolstran Date: Sun, 11 Oct 2020 22:19:49 +0200 Subject: [PATCH 1/3] Initial commit of FAQ page --- src/components/Sidebar/FAQSidebar.js | 32 +++++++++++++++++++ .../faq/General-DoesGraphQLReplaceREST.md | 12 +++++++ .../faq/General-DoesGraphQLReplaceRedux.md | 14 ++++++++ src/content/faq/General-HowCanIContribute.md | 12 +++++++ .../faq/General-HowCanILearnGraphQL.md | 14 ++++++++ .../faq/General-IsGraphQLADatabaseLanguage.md | 12 +++++++ .../faq/General-IsGraphQLFrontendOrBackend.md | 12 +++++++ .../faq/General-IsGraphQLOnlyForJavaScript.md | 15 +++++++++ .../faq/General-WhatIsAGraphQLClient.md | 13 ++++++++ .../faq/General-WhatIsTheFoundation.md | 17 ++++++++++ .../faq/General-WhyShouldIUseGraphQL.md | 12 +++++++ src/templates/FAQLayout.js | 26 +++++++++++++++ 12 files changed, 191 insertions(+) create mode 100644 src/components/Sidebar/FAQSidebar.js create mode 100644 src/content/faq/General-DoesGraphQLReplaceREST.md create mode 100644 src/content/faq/General-DoesGraphQLReplaceRedux.md create mode 100644 src/content/faq/General-HowCanIContribute.md create mode 100644 src/content/faq/General-HowCanILearnGraphQL.md create mode 100644 src/content/faq/General-IsGraphQLADatabaseLanguage.md create mode 100644 src/content/faq/General-IsGraphQLFrontendOrBackend.md create mode 100644 src/content/faq/General-IsGraphQLOnlyForJavaScript.md create mode 100644 src/content/faq/General-WhatIsAGraphQLClient.md create mode 100644 src/content/faq/General-WhatIsTheFoundation.md create mode 100644 src/content/faq/General-WhyShouldIUseGraphQL.md create mode 100644 src/templates/FAQLayout.js diff --git a/src/components/Sidebar/FAQSidebar.js b/src/components/Sidebar/FAQSidebar.js new file mode 100644 index 0000000000..1432411513 --- /dev/null +++ b/src/components/Sidebar/FAQSidebar.js @@ -0,0 +1,32 @@ +import React from 'react' +import { useStaticQuery, graphql } from 'gatsby' + +import Sidebar from './Sidebar' + +const FAQSidebar = () => { + const { allMarkdownRemark: { edges: data } } = useStaticQuery( graphql` + query FAQPageSidebar { + allMarkdownRemark( + filter: {frontmatter: {permalink: {regex: "/faq/"}}}, + sort: {fields: frontmatter___sidebarOrder} + ) { + edges { + node { + id + frontmatter { + category + sidebarTitle + sublinks + permalink + title + } + } + } + } + } +` ) + + return +} + +export default FAQSidebar diff --git a/src/content/faq/General-DoesGraphQLReplaceREST.md b/src/content/faq/General-DoesGraphQLReplaceREST.md new file mode 100644 index 0000000000..01a859ccbe --- /dev/null +++ b/src/content/faq/General-DoesGraphQLReplaceREST.md @@ -0,0 +1,12 @@ +--- +title: Does GraphQL replace REST? +sidebarTitle: Does GraphQL replace REST? +category: FAQ +layout: FAQLayout +sidebarOrder: 3 +permalink: /faq/does-graphql-replace-rest/ +--- + + + +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. \ No newline at end of file diff --git a/src/content/faq/General-DoesGraphQLReplaceRedux.md b/src/content/faq/General-DoesGraphQLReplaceRedux.md new file mode 100644 index 0000000000..79c5e0ee05 --- /dev/null +++ b/src/content/faq/General-DoesGraphQLReplaceRedux.md @@ -0,0 +1,14 @@ +--- +title: Does GraphQL replace Redux or other state management libraries? +sidebarTitle: Does GraphQL replace Redux? +category: FAQ +layout: FAQLayout +sidebarOrder: 6 +permalink: /faq/does-graphql-replace-redux/ +--- + + + +Sweet roll candy danish cupcake bonbon biscuit. Jelly-o soufflé chocolate cake fruitcake cookie croissant ice cream tart. + +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. \ No newline at end of file diff --git a/src/content/faq/General-HowCanIContribute.md b/src/content/faq/General-HowCanIContribute.md new file mode 100644 index 0000000000..db578321c5 --- /dev/null +++ b/src/content/faq/General-HowCanIContribute.md @@ -0,0 +1,12 @@ +--- +title: How can I contribute to the GraphQL specification? +sidebarTitle: How can I contribute? +category: FAQ +layout: FAQLayout +sidebarOrder: 10 +permalink: /faq/how-can-i-contribute/ +--- + + + +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 diff --git a/src/content/faq/General-HowCanILearnGraphQL.md b/src/content/faq/General-HowCanILearnGraphQL.md new file mode 100644 index 0000000000..cb62b91458 --- /dev/null +++ b/src/content/faq/General-HowCanILearnGraphQL.md @@ -0,0 +1,14 @@ +--- +title: How can I learn GraphQL? +sidebarTitle: How can I learn GraphQL? +category: FAQ +layout: FAQLayout +sidebarOrder: 4 +permalink: /faq/how-can-i-learn-graphql/ +--- + + + +Gummies lollipop chocolate dragée liquorice. Pastry marzipan pie sugar plum halvah topping halvah soufflé marzipan. Biscuit liquorice marshmallow. + +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. \ No newline at end of file diff --git a/src/content/faq/General-IsGraphQLADatabaseLanguage.md b/src/content/faq/General-IsGraphQLADatabaseLanguage.md new file mode 100644 index 0000000000..d7e6340253 --- /dev/null +++ b/src/content/faq/General-IsGraphQLADatabaseLanguage.md @@ -0,0 +1,12 @@ +--- +title: Is GraphQL a database language like SQL? +sidebarTitle: Is GraphQL a database language? +category: FAQ +layout: FAQLayout +sidebarOrder: 2 +permalink: /faq/is-graphql-a-database-language/ +--- + + + +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. \ No newline at end of file diff --git a/src/content/faq/General-IsGraphQLFrontendOrBackend.md b/src/content/faq/General-IsGraphQLFrontendOrBackend.md new file mode 100644 index 0000000000..ef2192f9d1 --- /dev/null +++ b/src/content/faq/General-IsGraphQLFrontendOrBackend.md @@ -0,0 +1,12 @@ +--- +title: Is GraphQL frontend or backend? +sidebarTitle: Is GraphQL frontend or backend? +category: FAQ +layout: FAQLayout +sidebarOrder: 5 +permalink: /faq/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. \ No newline at end of file diff --git a/src/content/faq/General-IsGraphQLOnlyForJavaScript.md b/src/content/faq/General-IsGraphQLOnlyForJavaScript.md new file mode 100644 index 0000000000..1b487b1468 --- /dev/null +++ b/src/content/faq/General-IsGraphQLOnlyForJavaScript.md @@ -0,0 +1,15 @@ +--- +title: Is GraphQL only for React or JavaScript developers? +sidebarTitle: Is GraphQL only for JavaScript? +category: FAQ +layout: FAQLayout +sidebarOrder: 7 +permalink: /faq/is-graphql-only-for-javascript/ +--- + + + +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. + +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. + diff --git a/src/content/faq/General-WhatIsAGraphQLClient.md b/src/content/faq/General-WhatIsAGraphQLClient.md new file mode 100644 index 0000000000..3b2013a165 --- /dev/null +++ b/src/content/faq/General-WhatIsAGraphQLClient.md @@ -0,0 +1,13 @@ +--- +title: What is a GraphQL client and why would I use one? +sidebarTitle: What is a GraphQL client? +category: FAQ +layout: FAQLayout +sidebarOrder: 8 +permalink: /faq/what-is-a-graphql-client/ +--- + + + +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. + diff --git a/src/content/faq/General-WhatIsTheFoundation.md b/src/content/faq/General-WhatIsTheFoundation.md new file mode 100644 index 0000000000..86ca6f7d70 --- /dev/null +++ b/src/content/faq/General-WhatIsTheFoundation.md @@ -0,0 +1,17 @@ +--- +title: What is the GraphQL Foundation? +sidebarTitle: What is the GraphQL Foundation? +category: FAQ +layout: FAQLayout +sidebarOrder: 9 +permalink: /faq/what-is-the-graphql-foundation/ +--- + + + +Chupa chups gummies I love. + +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. + diff --git a/src/content/faq/General-WhyShouldIUseGraphQL.md b/src/content/faq/General-WhyShouldIUseGraphQL.md new file mode 100644 index 0000000000..196fad5ecb --- /dev/null +++ b/src/content/faq/General-WhyShouldIUseGraphQL.md @@ -0,0 +1,12 @@ +--- +title: Why should I use GraphQL? +sidebarTitle: Why GraphQL? +category: FAQ +layout: FAQLayout +sidebarOrder: 1 +permalink: /faq/why-graphql/ +--- + + + +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. \ No newline at end of file diff --git a/src/templates/FAQLayout.js b/src/templates/FAQLayout.js new file mode 100644 index 0000000000..2780efcb13 --- /dev/null +++ b/src/templates/FAQLayout.js @@ -0,0 +1,26 @@ +import React from 'react' +import { graphql } from 'gatsby' +import { shape } from 'prop-types' + +import Template from './Template' +import Sidebar from '../components/Sidebar/FAQSidebar' + +export const query = graphql` + query FAQPageLayout($id: String ) { + markdownRemark(id: { eq: $id }, frontmatter: { layout: { eq:"FAQLayout" } }) { + html + frontmatter { + title + next + } + } + } +` + +const FAQLayout = ( { data } ) =>