You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, use [Yarn](https://yarnpkg.com/getting-started/install) to install and load all the necessary dependencies:
39
39
40
40
```bash
41
-
yarn
41
+
yarn
42
42
```
43
43
44
44
> 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
51
51
52
52
Finally, open [http://localhost:8000](http://localhost:8000) to view it in the browser.
53
53
54
-
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.
54
+
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.
55
55
56
56
### Branching
57
57
58
-
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`.
58
+
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`.
59
59
60
60
### Project structure
61
61
62
-
-`static`: Files that will be copied directly to `public`.
62
+
-`static`: Files that will be copied directly to `public`.
63
63
-`public`: Output files that will be served by a static HTTP server.
64
64
-`src`: Markdown and the TypeScript/JavaScript files used to generate the website.
65
-
-`assets`: All the [`less`](http://lesscss.org/) files that contain stylesheets.
66
-
-`components` and `Containers`: React components used for layouts and pages.
67
-
-`content`: Markdown files with the content of pages.
68
-
-`templates`: Layout templates.
69
-
-`utils`: Helper functions.
65
+
-`assets`: All the [`less`](http://lesscss.org/) files that contain stylesheets.
66
+
-`components` and `Containers`: React components used for layouts and pages.
67
+
-`content`: Markdown files with the content of pages.
68
+
-`templates`: Layout templates.
69
+
-`utils`: Helper functions.
70
70
71
71
### Publishing the updated site
72
72
@@ -76,7 +76,7 @@ Your changes will be merged into the `source` branch. Then, the CI will automati
76
76
77
77
### Fix a typo, code sample bug, or formatting
78
78
79
-
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.
79
+
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.
80
80
81
81
All of the content on graphql.org is written and formatted in [Markdown](https://www.gatsbyjs.com/docs/mdx/markdown-syntax/).
82
82
@@ -87,31 +87,33 @@ The [Code page](https://graphql.org/code/) is a collection of libraries, tools,
87
87
#### General guidelines
88
88
89
89
**Adding a resource:**
90
+
90
91
- With rare exceptions, any pull request that adds a new library, tool, or service to the Code page will be accepted.
91
92
- Any library should include a few paragraphs describing the usage and offering people a chance to grok the project priorities.
92
-
- If there isn't a section already for your programming language, please add it.
93
+
- If there isn't a section already for your programming language, please add it.
93
94
94
95
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.
95
96
96
97
**Removing a resource:**
98
+
97
99
- Services that don't work anymore
98
100
- Code repositories that are archived
99
101
- Projects declared to be abandoned by their maintainers
100
102
- Any link that 404s
101
103
102
-
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.
104
+
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.
103
105
104
106
#### Workflow
105
107
106
-
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).
108
+
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).
107
109
108
110
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/).
109
111
110
112
### Add a resource to the Community page
111
113
112
114
The [Community page](https://graphql.org/community/) highlights resources and groups that help people get more involved with GraphQL.
113
115
114
-
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).
116
+
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).
115
117
116
118
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/).
117
119
@@ -129,7 +131,7 @@ When your answer is ready, [open a pull request](https://github.com/graphql/grap
129
131
130
132
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.
131
133
132
-
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/).
134
+
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/).
133
135
134
136
Once it's ready for review, please [open a pull request](https://github.com/graphql/graphql.github.io/pulls/).
135
137
@@ -141,15 +143,15 @@ If you're working off an [existing issue](https://github.com/graphql/graphql.git
141
143
142
144
### Browser support
143
145
144
-
We aim to support the latest stable versions of Chrome, Edge, Firefox, Safari, and Safari on mobile.
146
+
We aim to support the latest stable versions of Chrome, Edge, Firefox, Safari, and Safari on mobile.
145
147
146
148
## Contributing something else
147
149
148
150
Interested in adding something not covered in this guide? Please [open an issue](https://github.com/graphql/graphql.github.io/issues/new) and tell us all about your idea.
149
151
150
152
## Asking questions
151
153
152
-
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).
154
+
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).
153
155
154
156
# Opening a PR to contribute your code
155
157
@@ -161,4 +163,4 @@ To initiate the signature process please open a PR against this repo. The EasyCL
161
163
162
164
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [[email protected]](mailto:[email protected]).
163
165
164
-
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).
166
+
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).
Copy file name to clipboardExpand all lines: README.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
This repository contains the source code for the [GraphQL website](https://graphql.org).
4
4
5
-
> 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/)
5
+
> 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/)
6
6
7
-
8
-
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/).
7
+
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/).
-[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
19
19
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).
20
20
21
21
## How to contribute
22
+
22
23
Check out our [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to make changes to the GraphQL website 🎉
23
24
24
25
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
27
28
28
29
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [[email protected]](mailto:[email protected]).
29
30
30
-
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).
31
+
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).
Then run `node server.js` with this code in `server.js`:
53
53
54
54
```js
55
-
var express = require('express');
56
-
var { graphqlHTTP } = require('express-graphql');
57
-
var { buildSchema } = require('graphql');
55
+
var express = require("express")
56
+
var { graphqlHTTP } = require("express-graphql")
57
+
var { buildSchema } = require("graphql")
58
58
59
59
var schema = buildSchema(`
60
60
type Query {
61
61
hello: String
62
62
}
63
-
`);
64
-
65
-
var root = { hello: () => 'Hello world!' };
66
-
67
-
var app = express();
68
-
app.use('/graphql', graphqlHTTP({
69
-
schema: schema,
70
-
rootValue: root,
71
-
graphiql: true,
72
-
}));
73
-
app.listen(4000, () => console.log('Now browse to localhost:4000/graphql'));
63
+
`)
64
+
65
+
var root = { hello: () => "Hello world!" }
66
+
67
+
var app = express()
68
+
app.use(
69
+
"/graphql",
70
+
graphqlHTTP({
71
+
schema: schema,
72
+
rootValue: root,
73
+
graphiql: true,
74
+
})
75
+
)
76
+
app.listen(4000, () => console.log("Now browse to localhost:4000/graphql"))
74
77
```
75
-
76
78
````
77
79
78
80
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.
0 commit comments