diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md
index 90cff75711..13ade362dc 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.md
+++ b/.github/ISSUE_TEMPLATE/bug-report.md
@@ -14,19 +14,19 @@ labels: bug
-### Expected Result
+### Expected Result
-### Actual Result
+### Actual Result
### Additional Context
-
\ No newline at end of file
+-->
diff --git a/.github/ISSUE_TEMPLATE/code-changes.md b/.github/ISSUE_TEMPLATE/code-changes.md
index ad751612cd..a8e5849bd3 100644
--- a/.github/ISSUE_TEMPLATE/code-changes.md
+++ b/.github/ISSUE_TEMPLATE/code-changes.md
@@ -20,4 +20,4 @@ labels: enhancement
### Additional Context
-
\ No newline at end of file
+
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 9b9f5e0d5f..8c623d5fb9 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,10 +1,10 @@
@@ -12,4 +12,4 @@ Closes #
## Description
-
\ No newline at end of file
+
diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml
new file mode 100644
index 0000000000..0e1d034712
--- /dev/null
+++ b/.github/workflows/prettier.yml
@@ -0,0 +1,13 @@
+name: Prettier Check
+
+on: pull_request
+
+jobs:
+ prettier-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Dependencies
+ run: yarn
+ - name: Run Prettier Check
+ run: yarn format:check
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c3afcd0cb8..28da1c5161 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,25 +2,25 @@
> This repository is governed by the [GraphQL Code of Conduct](https://graphql.org/codeofconduct/). By contributing, you agree to abide by its terms.
-Thanks for taking the time to contribute! The GraphQL community is great because of people like you 🎉
+Thanks for taking the time to contribute! The GraphQL community is great because of people like you 🎉
There are many ways to get involved. Follow this guide and feel free to [reach out if you have questions](#asking-questions).
## What's in this document
- [Development guide](#development-guide)
- - [Running the site locally](#running-the-site-locally)
- - [Branching](#branching)
- - [Project structure](#project-structure)
- - [Publishing the updated site](#publishing-the-updated-site)
+ - [Running the site locally](#running-the-site-locally)
+ - [Branching](#branching)
+ - [Project structure](#project-structure)
+ - [Publishing the updated site](#publishing-the-updated-site)
- [Updating content](#updating-content)
- - [Fix a typo, code sample bug, or formatting](#fix-a-typo-code-sample-bug-or-formatting)
- - [Add a library or tool to the Code page](#add-a-library-or-tool-to-the-code-page)
- - [Add a resource to the Community page](#add-a-resource-to-the-community-page)
- - [Add a question to the FAQ](#add-a-question-to-the-faq)
- - [Write a new section or guide](#write-a-new-section-or-guide)
+ - [Fix a typo, code sample bug, or formatting](#fix-a-typo-code-sample-bug-or-formatting)
+ - [Add a library or tool to the Code page](#add-a-library-or-tool-to-the-code-page)
+ - [Add a resource to the Community page](#add-a-resource-to-the-community-page)
+ - [Add a question to the FAQ](#add-a-question-to-the-faq)
+ - [Write a new section or guide](#write-a-new-section-or-guide)
- [Making changes to the code](#making-changes-to-the-code)
- - [Browser support](#browser-support)
+ - [Browser support](#browser-support)
- [Contributing something else](#contributing-something-else)
- [Asking questions](#asking-questions)
@@ -28,7 +28,7 @@ There are many ways to get involved. Follow this guide and feel free to [reach o
### Running the site locally
-First, clone this repository and move into the directory:
+First, clone this repository and move into the directory:
```bash
git clone https://github.com/graphql/graphql.github.io.git
@@ -38,7 +38,7 @@ cd graphql.github.io
Then, use [Yarn](https://yarnpkg.com/getting-started/install) to install and load all the necessary dependencies:
```bash
-yarn
+yarn
```
> Note: [Yarn is currently the only way to run the site locally](https://github.com/graphql/graphql.github.io/issues/946).
@@ -51,22 +51,22 @@ yarn start
Finally, open [http://localhost:8000](http://localhost:8000) to view it in the browser.
-The GraphQL website is built with [Gatsby](https://www.gatsbyjs.com/docs/). This means that a hot-reloading development environment will be accessible by default.
+The GraphQL website is built with [Gatsby](https://www.gatsbyjs.com/docs/). This means that a hot-reloading development environment will be accessible by default.
### Branching
-Active development for graphql.org happens on the `source` branch. Be sure to create any new branches or direct any pull requests back to `source`.
+Active development for graphql.org happens on the `source` branch. Be sure to create any new branches or direct any pull requests back to `source`.
### Project structure
-- `static`: Files that will be copied directly to `public`.
+- `static`: Files that will be copied directly to `public`.
- `public`: Output files that will be served by a static HTTP server.
- `src`: Markdown and the TypeScript/JavaScript files used to generate the website.
- - `assets`: All the [`less`](http://lesscss.org/) files that contain stylesheets.
- - `components` and `Containers`: React components used for layouts and pages.
- - `content`: Markdown files with the content of pages.
- - `templates`: Layout templates.
- - `utils`: Helper functions.
+ - `assets`: All the [`less`](http://lesscss.org/) files that contain stylesheets.
+ - `components` and `Containers`: React components used for layouts and pages.
+ - `content`: Markdown files with the content of pages.
+ - `templates`: Layout templates.
+ - `utils`: Helper functions.
### Publishing the updated site
@@ -76,7 +76,7 @@ Your changes will be merged into the `source` branch. Then, the CI will automati
### Fix a typo, code sample bug, or formatting
-If you notice something wrong in the text or code samples, please follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls) with your fix.
+If you notice something wrong in the text or code samples, please follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls) with your fix.
All of the content on graphql.org is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
@@ -87,23 +87,25 @@ The [Code page](https://graphql.org/code/) is a collection of libraries, tools,
#### General guidelines
**Adding a resource:**
+
- With rare exceptions, any pull request that adds a new library, tool, or service to the Code page will be accepted.
- Any library should include a few paragraphs describing the usage and offering people a chance to grok the project priorities.
-- If there isn't a section already for your programming language, please add it.
+- If there isn't a section already for your programming language, please add it.
If it isn't a library, tool, or service - then it could go on the [Community page](#add-a-resource-to-the-community-page). If you aren't sure where your resource would fit, you can [open an issue](https://github.com/graphql/graphql.github.io/issues/new) and ask.
**Removing a resource:**
+
- Services that don't work anymore
- Code repositories that are archived
- Projects declared to be abandoned by their maintainers
- Any link that 404s
-We rely on these concrete signals before removing a resource. Even if a project hasn't been released in a few years, that doesn't mean that it's not working.
+We rely on these concrete signals before removing a resource. Even if a project hasn't been released in a few years, that doesn't mean that it's not working.
#### Workflow
-To add or remove a resource to this page, follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls).
+To add or remove a resource to this page, follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls).
The content for this page is located in [various directories under `src/content/code`](./src/). Everything is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
@@ -111,7 +113,7 @@ The content for this page is located in [various directories under `src/content/
The [Community page](https://graphql.org/community/) highlights resources and groups that help people get more involved with GraphQL.
-To add something to this page, follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls).
+To add something to this page, follow our [development guide](#development-guide) to [open a pull request](https://github.com/graphql/graphql.github.io/pulls).
The content for this page is located in a [directory under `src/content/community`](./src/). Everything is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
@@ -129,7 +131,7 @@ When your answer is ready, [open a pull request](https://github.com/graphql/grap
There are still several [Best Practices guides that no one has written](https://github.com/graphql/graphql.github.io/issues/41) yet. If you want to take one of these, comment on [the original issue](https://github.com/graphql/graphql.github.io/issues/41) and mention which topic you'll work on.
-Then, use our [development guide](#development-guide) to determine where your new page best fits. Our documentation is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
+Then, use our [development guide](#development-guide) to determine where your new page best fits. Our documentation is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
Once it's ready for review, please [open a pull request](https://github.com/graphql/graphql.github.io/pulls/).
@@ -141,7 +143,7 @@ If you're working off an [existing issue](https://github.com/graphql/graphql.git
### Browser support
-We aim to support the latest stable versions of Chrome, Edge, Firefox, Safari, and Safari on mobile.
+We aim to support the latest stable versions of Chrome, Edge, Firefox, Safari, and Safari on mobile.
## Contributing something else
@@ -149,7 +151,7 @@ Interested in adding something not covered in this guide? Please [open an issue]
## Asking questions
-If you run into any problems or have questions while contributing, you're always welcome to [open an issue](https://github.com/graphql/graphql.github.io/issues/new).
+If you run into any problems or have questions while contributing, you're always welcome to [open an issue](https://github.com/graphql/graphql.github.io/issues/new).
# Opening a PR to contribute your code
@@ -161,4 +163,4 @@ To initiate the signature process please open a PR against this repo. The EasyCL
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [operations@graphql.org](mailto:operations@graphql.org).
-If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).
+If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).
diff --git a/README.md b/README.md
index 40bd41af3d..f214113d6f 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,12 @@
This repository contains the source code for the [GraphQL website](https://graphql.org).
-> You can find more discussions on the [#website channel on the GraphQL Slack](https://graphql.slack.com/messages/website/). [Get your invite here!](https://graphql-slack.herokuapp.com/)
+> You can find more discussions on the [#website channel on the GraphQL Slack](https://graphql.slack.com/messages/website/). [Get your invite here!](https://graphql-slack.herokuapp.com/)
-
-A brief overview: **GraphQL** is a query language for APIs and a runtime for fulfilling those queries with your existing data. It provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need, and enables powerful developer tools. The [specification](https://spec.graphql.org/) is open source and governed by the [GraphQL Foundation](https://foundation.graphql.org/).
+A brief overview: **GraphQL** is a query language for APIs and a runtime for fulfilling those queries with your existing data. It provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need, and enables powerful developer tools. The [specification](https://spec.graphql.org/) is open source and governed by the [GraphQL Foundation](https://foundation.graphql.org/).
## Documentation
+
- [Site](https://graphql.org/)
- [Reference documentation](https://graphql.org/learn/)
- [Language support, tools, and services](https://graphql.org/code/)
@@ -19,6 +19,7 @@ A brief overview: **GraphQL** is a query language for APIs and a runtime for ful
The site is deployed via Netlify on merges to the source branch, you can see the [builds here](https://app.netlify.com/teams/graphql-org/builds).
## How to contribute
+
Check out our [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to make changes to the GraphQL website 🎉
This repository is managed by EasyCLA. Project participants must sign the free ([GraphQL Specification Membership agreement](https://preview-spec-membership.graphql.org) before making a contribution. You only need to do this one time, and it can be signed by [individual contributors](http://individual-spec-membership.graphql.org/) or their [employers](http://corporate-spec-membership.graphql.org/).
@@ -27,4 +28,4 @@ To initiate the signature process please open a PR against this repo. The EasyCL
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [operations@graphql.org](mailto:operations@graphql.org).
-If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).
\ No newline at end of file
+If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).
diff --git a/notes/ContributingToCodePage.md b/notes/ContributingToCodePage.md
index 4858474c34..24dff39f60 100644
--- a/notes/ContributingToCodePage.md
+++ b/notes/ContributingToCodePage.md
@@ -1,6 +1,6 @@
## Contributing to the Code Page
-Hi, thanks for reading the docs!
+Hi, thanks for reading the docs!
Secondly, we want to provide a really strong overview of all the libraries in the GraphQL eco-system. To make this
easy for contributors the code page is automatically generated from a series of markdown files in this repo.
@@ -52,27 +52,29 @@ npm install express express-graphql graphql
Then run `node server.js` with this code in `server.js`:
```js
-var express = require('express');
-var { graphqlHTTP } = require('express-graphql');
-var { buildSchema } = require('graphql');
+var express = require("express")
+var { graphqlHTTP } = require("express-graphql")
+var { buildSchema } = require("graphql")
var schema = buildSchema(`
type Query {
hello: String
}
-`);
-
-var root = { hello: () => 'Hello world!' };
-
-var app = express();
-app.use('/graphql', graphqlHTTP({
- schema: schema,
- rootValue: root,
- graphiql: true,
-}));
-app.listen(4000, () => console.log('Now browse to localhost:4000/graphql'));
+`)
+
+var root = { hello: () => "Hello world!" }
+
+var app = express()
+app.use(
+ "/graphql",
+ graphqlHTTP({
+ schema: schema,
+ rootValue: root,
+ graphiql: true,
+ })
+)
+app.listen(4000, () => console.log("Now browse to localhost:4000/graphql"))
```
-
````
Any library/tool/service has a maximum height in the site, and then it can be expanded by clicking, so if you need quite a lot of space to explain your project then that's OK.
diff --git a/notes/NewSiteArchitecture.md b/notes/NewSiteArchitecture.md
index f933f1a3e5..3fd8ea4290 100644
--- a/notes/NewSiteArchitecture.md
+++ b/notes/NewSiteArchitecture.md
@@ -2,172 +2,173 @@
## Index
-*Goal:* This is the landing page and is our opportunity to quickly capture attention and explain what GraphQL is and why you should care.
+_Goal:_ This is the landing page and is our opportunity to quickly capture attention and explain what GraphQL is and why you should care.
-*Timeframe:* Launch Mon, Sept 12th
+_Timeframe:_ Launch Mon, Sept 12th
This page is effectively a marketing page for GraphQL and should be the visual, scrollable version of the "Introducing GraphQL" conference talks and should be rich with visual metaphor and illustration and take advantage of whitespace to make individual salient points.
Above the fold, this page should succinctly explain what GraphQL is and illustrate with a simple (editable) query/response example. Before scrolling, you should understand the following:
-* GraphQL solves the same problem as REST.
-* GraphQL is a query language for APIs (and not Databases).
-* GraphQL is sent by client applications, such as an iOS app.
-* GraphQL is evaluated by a web service and often returned as JSON.
-* GraphQL services provide a complete description of your data with a type system.
-* It's easy to build powerful tools for your data using GraphQL.
+- GraphQL solves the same problem as REST.
+- GraphQL is a query language for APIs (and not Databases).
+- GraphQL is sent by client applications, such as an iOS app.
+- GraphQL is evaluated by a web service and often returned as JSON.
+- GraphQL services provide a complete description of your data with a type system.
+- It's easy to build powerful tools for your data using GraphQL.
Below the fold we should introduce concepts one at a time, each with visual metaphor and take-aways:
-1) GraphQL clients describe what they need in terms of how client developers think about data.
+1. GraphQL clients describe what they need in terms of how client developers think about data.
-* If you're familiar with JSON, GraphQL is easy to learn and understand.
-* GraphQL only sends what you ask for, nothing more or less, making your app faster and more stable.
-* It's easy to anticipate the shape of the result of any query.
+- If you're familiar with JSON, GraphQL is easy to learn and understand.
+- GraphQL only sends what you ask for, nothing more or less, making your app faster and more stable.
+- It's easy to anticipate the shape of the result of any query.
-2) GraphQL queries can access many "resources" in a single network request.
+2. GraphQL queries can access many "resources" in a single network request.
-* A query can access properties of not just one object, but of many related objects.
-* A query can access multiple unrelated objects at once.
-* Compared to REST, GraphQL collects all the data needed for your app with much less network activity, making your app faster.
+- A query can access properties of not just one object, but of many related objects.
+- A query can access multiple unrelated objects at once.
+- Compared to REST, GraphQL collects all the data needed for your app with much less network activity, making your app faster.
-3) GraphQL services describes what's possible with a strong type system.
+3. GraphQL services describes what's possible with a strong type system.
-* GraphQL services provide a complete description of your data.
-* Every `{ }` corresponds to an object of a particular type, and every type describes the fields available.
-* GraphQL only runs queries that make sense and provides helpful error messages.
-* Tools and IDEs can make editing queries easy via type-aheads.
- * GraphiQL is a free tool that you can use.
-* Type system defines descriptions, making it easy to keep documentation up to date.
-* Every query guarantees the shape and type of its response.
+- GraphQL services provide a complete description of your data.
+- Every `{ }` corresponds to an object of a particular type, and every type describes the fields available.
+- GraphQL only runs queries that make sense and provides helpful error messages.
+- Tools and IDEs can make editing queries easy via type-aheads.
+ - GraphiQL is a free tool that you can use.
+- Type system defines descriptions, making it easy to keep documentation up to date.
+- Every query guarantees the shape and type of its response.
-4) GraphQL is composable via fragments.
+4. GraphQL is composable via fragments.
-* Fragments describe a portion of some Type to be queried.
-* Fragments are often used next to View code where data is used.
-* Fragments are composed together to create full queries.
+- Fragments describe a portion of some Type to be queried.
+- Fragments are often used next to View code where data is used.
+- Fragments are composed together to create full queries.
-5) GraphQL makes backwards-compatible APIs easy.
+5. GraphQL makes backwards-compatible APIs easy.
-* Server does not need to worry about concerns of any particular client, only the complete set of capabilities. Clients are responsible for the data they receive.
-* Because GraphQL only sends what you ask for, new capabilities can be introduced via new fields on types with no impact on existing queries.
-* Old capabilities can be marked "deprecated" with no impact on existing queries.
-* No versioning your API when using GraphQL leads to cleaner code on the server.
+- Server does not need to worry about concerns of any particular client, only the complete set of capabilities. Clients are responsible for the data they receive.
+- Because GraphQL only sends what you ask for, new capabilities can be introduced via new fields on types with no impact on existing queries.
+- Old capabilities can be marked "deprecated" with no impact on existing queries.
+- No versioning your API when using GraphQL leads to cleaner code on the server.
-6) GraphQL queries are answered by simple functions on your server.
+6. GraphQL queries are answered by simple functions on your server.
-* GraphQL is not backed by any database technology, just like REST.
-* Every field on each type is represented by a function for retrieving that data.
-* GraphQL will call your functions and execute a query with optimal concurrency.
-* It's easy to write a GraphQL API using your existing data model.
+- GraphQL is not backed by any database technology, just like REST.
+- Every field on each type is represented by a function for retrieving that data.
+- GraphQL will call your functions and execute a query with optimal concurrency.
+- It's easy to write a GraphQL API using your existing data model.
Finally, there will be a set of links for learning more (diving into `Learn`) and for getting started (in `Code`). As well as a wall-o-logo for companies using GraphQL.
## Learn
-*Goal:* Introduce GraphQL, one concept at a time, covering both primary concepts and best practices.
+_Goal:_ Introduce GraphQL, one concept at a time, covering both primary concepts and best practices.
-*Timeframe:* Basic primary concepts by Sept 12th, advanced primary concepts by Sept 30th, best practices as ready over Q3/Q4.
+_Timeframe:_ Basic primary concepts by Sept 12th, advanced primary concepts by Sept 30th, best practices as ready over Q3/Q4.
Where "GraphQL the Spec" is designed for a specific audience of those building GraphQL servers, this represents "GraphQL the Book" and is designed for the audience of anyone who wishes to use GraphQL. It should cover both GraphQL core concepts in addition to best practices and further topics, and it should range from introductory concepts through advanced concepts.
The landing page for this section should begin as a more information-rich introduction to GraphQL, explaining why you might use it, and give a brief overview of the constituent parts. Take-aways from this introduction page:
-* GraphQL is a query language.
-* GraphQL servers describe a type system, called a "schema".
-* Clients can access a GraphQL server's type system to learn about what's possible.
-* Clients send queries to servers and typically get back JSON.
-* GraphQL servers validate and execute GraphQL queries.
+- GraphQL is a query language.
+- GraphQL servers describe a type system, called a "schema".
+- Clients can access a GraphQL server's type system to learn about what's possible.
+- Clients send queries to servers and typically get back JSON.
+- GraphQL servers validate and execute GraphQL queries.
There is then a TOC through the sections and chapters (this is a straw-man list, open to reordering and addition)
-* Introducing GraphQL (this initial page)
-* Core Concepts:
- * Requests:
- * Basics (queries & mutations, fields, arguments, aliases, comments)
- * Variables
- * Fragments
- * Values
- * Directives (skip & include)
- * Type System:
- * Basics (Schema, Objects & Fields)
- * Scalars & Enums
- * Lists & NonNull (mention error handling)
- * Interfaces & Unions
- * How GraphQL Works:
- * Validation
- * Execution & Error Handling
- * Introspection
-* Best Practices:
- * Servers:
- * Serving over HTTP
- * Authentication & Authorization
- * Mutations
- * Paginating Lists
- * Schema Changes & Versioning
- * Query Performance (Batching & Caching)
- * Security & Rate Limiting
- * Schema Design Guidelines
- * Clients:
- * Using Variables
- * Co-locating Fragments
- * Caching Results
- * Persisted Queries
- * Generating Models
- * Migrating from REST
+- Introducing GraphQL (this initial page)
+- Core Concepts:
+ - Requests:
+ - Basics (queries & mutations, fields, arguments, aliases, comments)
+ - Variables
+ - Fragments
+ - Values
+ - Directives (skip & include)
+ - Type System:
+ - Basics (Schema, Objects & Fields)
+ - Scalars & Enums
+ - Lists & NonNull (mention error handling)
+ - Interfaces & Unions
+ - How GraphQL Works:
+ - Validation
+ - Execution & Error Handling
+ - Introspection
+- Best Practices:
+ - Servers:
+ - Serving over HTTP
+ - Authentication & Authorization
+ - Mutations
+ - Paginating Lists
+ - Schema Changes & Versioning
+ - Query Performance (Batching & Caching)
+ - Security & Rate Limiting
+ - Schema Design Guidelines
+ - Clients:
+ - Using Variables
+ - Co-locating Fragments
+ - Caching Results
+ - Persisted Queries
+ - Generating Models
+ - Migrating from REST
## Code
-*Goal:* Introduce open source GraphQL tools along with quick getting started guidelines for each.
+_Goal:_ Introduce open source GraphQL tools along with quick getting started guidelines for each.
-*Timeframe:* At least 3 servers described by Sept 12th, remainder by Sept 30th.
+_Timeframe:_ At least 3 servers described by Sept 12th, remainder by Sept 30th.
This page is all about fulfilling the "Ok I'm sold! Now what?" conundrum. It should first very quickly reintroduce the elements of GraphQL you would expect to see software for as well as offer a quick path towards getting something working.
-1) Servers
+1. Servers
Explain the purpose of a GraphQL server, that there are servers written for many different languages and environments, and that graphql-js is the reference implementation operated by Facebook.
Each server should contain the following:
-* Logo
-* Name of Project
-* Language/Environment
-* Link to website
-* Getting started (e.g. npm install + code sample)
-2) Clients
+- Logo
+- Name of Project
+- Language/Environment
+- Link to website
+- Getting started (e.g. npm install + code sample)
+
+2. Clients
Explain the purpose of a GraphQL client, that it's okay to just use curl/XHR/fetch, and that clients can offer more value via smart caches and integration with UI frameworks.
Each client should contain similar set of info as servers.
-3) Services
+3. Services
Hosted GraphQL-as-a-service have an opportunity to pitch themselves here.
-4) Tools
+4. Tools
Common tools used by GraphQL community, e.g. GraphiQL.
## Community
-*Goal:* Central dispatch for finding help for GraphQL questions, learning about conferences and meetups, and connecting with the community.
+_Goal:_ Central dispatch for finding help for GraphQL questions, learning about conferences and meetups, and connecting with the community.
-*Timeframe:* Simple version by Sept 12th, evolve over time.
+_Timeframe:_ Simple version by Sept 12th, evolve over time.
This page should serve as a high-level view of what resources are available and what's going on in the community. It should encourage pull-requests to facilitate being updated by the community over time.
-* Links out to:
- * Stack Overflow topic
- * Slack/Discord channels
- * Popular blogs
- * Twitter feed
-* Calendar of upcoming meetups or conference talks related to GraphQL (encourage edits by community)
-* Grid of recorded videos about GraphQL (conf talks, etc).
+- Links out to:
+ - Stack Overflow topic
+ - Slack/Discord channels
+ - Popular blogs
+ - Twitter feed
+- Calendar of upcoming meetups or conference talks related to GraphQL (encourage edits by community)
+- Grid of recorded videos about GraphQL (conf talks, etc).
## Blog
-*Goal:* GraphQL core team's blog, signal-boosting popular articles written elsewhere.
+_Goal:_ GraphQL core team's blog, signal-boosting popular articles written elsewhere.
While any evergreen content typically belongs as chapters in the "Learn" section, the Blog is an opportunity for GraphQL core team members or occasional invited contributors to discuss experiments, interesting applications, or signal-boost things like new releases of the GraphQL spec, the reference implementation, upcoming events, or links out to interesting articles.
diff --git a/package.json b/package.json
index fa653af835..2c207d7f78 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
+ "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
diff --git a/renovate.json b/renovate.json
index f45d8f110c..4f39080e47 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,5 +1,3 @@
{
- "extends": [
- "config:base"
- ]
+ "extends": ["config:base"]
}
diff --git a/src/Containers/Sections/BringYourOwnCode/index.tsx b/src/Containers/Sections/BringYourOwnCode/index.tsx
index b6964cd687..d3217bf05a 100644
--- a/src/Containers/Sections/BringYourOwnCode/index.tsx
+++ b/src/Containers/Sections/BringYourOwnCode/index.tsx
@@ -2,7 +2,6 @@ import React, { useEffect } from "react"
import Prism from "../../../components/Prism"
const Index = (): JSX.Element => {
-
useEffect(() => {
let i = 0
var inView = document.getElementById("leverageCodeView")
@@ -15,7 +14,7 @@ const Index = (): JSX.Element => {
}
step()
return () => clearTimeout(timer)
- },[])
+ }, [])
return (
@@ -38,8 +37,7 @@ const Index = (): JSX.Element => {
- {/*Illustration: a query 2 or 3 levels deep]*/}
-
- GraphQL queries access not just the properties of one resource but
- also smoothly follow references between them. While typical REST
- APIs require loading from multiple URLs, GraphQL APIs get all the
- data your app needs in a single request. Apps using GraphQL can be
- quick even on slow mobile network connections.
-
-
-
-
-
-
+
+
+
+ Get many resources
+
+ in a single request
+
+ {/*Illustration: a query 2 or 3 levels deep]*/}
+
+ GraphQL queries access not just the properties of one resource but
+ also smoothly follow references between them. While typical REST
+ APIs require loading from multiple URLs, GraphQL APIs get all the
+ data your app needs in a single request. Apps using GraphQL can be
+ quick even on slow mobile network connections.
+
diff --git a/src/components/Conf/Section/index.tsx b/src/components/Conf/Section/index.tsx
index cf8446e3a4..e1df75589f 100644
--- a/src/components/Conf/Section/index.tsx
+++ b/src/components/Conf/Section/index.tsx
@@ -11,7 +11,9 @@ const SectionConf = ({ id, title, children }: Props): JSX.Element => (
// Padding down so hash-links to this id display below the header menu