Skip to content

Commit 4834210

Browse files
authored
Merge branch 'source' into patch-1
2 parents 19b7ad8 + 231fa23 commit 4834210

23 files changed

+3622
-748
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ Anytime you change the contents, just refresh the page and it's going to be upda
2626

2727
### Publish the Website
2828

29-
Once pushed to the `source` branch, Travis CI will publish http://graphql.org/
30-
29+
Once pushed to the `source` branch, Travis CI will publish http://graphql.org

resources/fileWalker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = fileWalker;
1414
var IGNORE_RX =
1515
/^(?:_|\.|(?:node_modules|package\.json|README\.(?:md|markdown))$)/;
1616

17-
var INCLUDE_RX = /^(?:\.nojekyll|\.htaccess)/;
17+
var INCLUDE_RX = /^(?:\.nojekyll|\.htaccess|\_redirects)/;
1818

1919
function fileWalker(dirPath, onVisitFile) {
2020
return new Promise((resolve, reject) => {

site/_core/HeaderLinks.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ const links = [
1212
{ section: 'learn', text: 'Learn', href: '/learn/' },
1313
{ section: 'code', text: 'Code', href: '/code/' },
1414
{ section: 'community', text: 'Community', href: '/community/' },
15-
{ section: 'blog', text: 'Blog', href: '/blog/' },
16-
{ section: 'spec', text: 'Spec', href: 'http://facebook.github.io/graphql/' },
15+
{ section: 'spec', text: 'Spec', href: 'https://facebook.github.io/graphql/' },
16+
{ section: 'codeofconduct', text: 'Code of Conduct', href: '/codeofconduct/' },
17+
{ section: 'foundation', text: 'Foundation', href: 'https://foundation.graphql.org/' },
1718
];
1819

1920
export default ({ section }) =>

site/_core/Site.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,14 @@ export default ({ page, category, title, section, className, noSearch, children
8181
</div>
8282
<div>
8383
<h5>More</h5>
84-
<a href="/blog">GraphQL Team Blog</a>
85-
<a href="http://facebook.github.io/graphql/" target="_blank" rel="noopener noreferrer">Read the Spec</a>
86-
<a href="https://github.com/graphql" target="_blank" rel="noopener noreferrer">GitHub</a>
84+
<a href="https://facebook.github.io/graphql/" target="_blank" rel="noopener noreferrer">GraphQL Specification</a>
85+
<a href="https://foundation.graphql.org/" target="_blank" rel="noopener noreferrer">GraphQL Foundation</a>
86+
<a href="https://github.com/graphql" target="_blank" rel="noopener noreferrer">GraphQL GitHub</a>
8787
{page && <a href={'https://github.com/graphql/graphql.github.io/edit/source/site/' + page.relPath} target="_blank" rel="noopener noreferrer">Edit this page &#x270E;</a>}
8888
</div>
8989
</section>
90-
<a href="https://code.facebook.com/projects/" target="_blank" rel="noopener noreferrer" className="fbOpenSource">
91-
<img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45" />
92-
</a>
9390
<section className="copyright">
94-
Copyright &copy;
95-
<span><script>document.write(new Date().getFullYear())</script> </span>
96-
<noscript>2017 </noscript>
97-
Facebook Inc. The contents of this page are licensed BSD-3-Clause.
91+
Copyright © 2019 The GraphQL Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage">Trademark Usage</a> page. Linux is a registered trademark of Linus Torvalds. <a href="http://www.linuxfoundation.org/privacy">Privacy Policy</a> and <a href="http://www.linuxfoundation.org/terms">Terms of Use</a>.
9892
</section>
9993
</footer>
10094

site/_redirects

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/swapi-graphql https://graphql.github.io/swapi-graphql/ 200
2+
/swapi-graphql/* https://graphql.github.io/swapi-graphql/:splat 200

site/blog/20160502-rest-api-graphql-wrapper.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const PersonType = new GraphQLObjectType({
141141
/* ... */
142142
friends: {
143143
type: new GraphQLList(PersonType),
144-
resolve: person => person.friends.map(getPersonByURL),
144+
resolve: person => person.friends.map(fetchPersonByURL),
145145
},
146146
}),
147147
});
@@ -395,7 +395,7 @@ To create a `DataLoader` you supply a method that can resolve a list of objects
395395

396396
```js
397397
const personLoader = new DataLoader(
398-
urls => Promise.all(urls.map(getPersonByURL))
398+
urls => Promise.all(urls.map(fetchPersonByURL))
399399
);
400400
```
401401

site/code/index.html.js

Lines changed: 54 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,18 @@ In addition to the GraphQL [reference implementations in JavaScript](#javascript
3333
- [Groovy](#groovy)
3434
- [Java](#java)
3535
- [JavaScript](#javascript)
36+
- [Kotlin](#kotlin)
3637
- [PHP](#php)
3738
- [Python](#python)
38-
- [Scala](#scala)
3939
- [Ruby](#ruby)
40+
- [Rust](#rust)
41+
- [Scala](#scala)
4042
4143
### C# / .NET
4244
4345
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
4446
- [graphql-net](https://github.com/ckimes89/graphql-net): Convert GraphQL to IQueryable
45-
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Service for .net core and .net classic
47+
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .NET core and .NET classic
4648
4749
### Clojure
4850
@@ -107,7 +109,9 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
107109
(executor/execute nil schema resolver-fn "{ hello }")
108110
\`\`\`
109111
110-
- [lacinia](https://github.com/walmartlabs/lacinia): A full implementation of the GraphQL specification that aims to maintain external compliance with the specification.
112+
#### [lacinia](https://github.com/walmartlabs/lacinia)
113+
114+
A full implementation of the GraphQL specification that aims to maintain external compliance with the specification.
111115
112116
### Elixir
113117
@@ -121,19 +125,21 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
121125
### Go
122126
123127
- [graphql-go](https://github.com/graphql-go/graphql): An implementation of GraphQL for Go / Golang.
128+
- [graph-gophers/graphql-go](https://github.com/graph-gophers/graphql-go): An active implementation of GraphQL in Golang (was https://github.com/neelance/graphql-go).
129+
- [GQLGen](https://github.com/99designs/gqlgen) - Go generate based graphql server library.
124130
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
125-
- [neelance/graphql-go](https://github.com/neelance/graphql-go): An active implementation of GraphQL in Golang.
126131
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
127132
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
128133
- [99designs/gqlgen](https://github.com/99designs/gqlgen): A schema first GraphQL server generation.
134+
- [appointy/jaal](https://github.com/appointy/jaal): Develop spec compliant GraphQL servers in Go.
129135
130-
### Groovy
136+
### Groovy
131137
132138
#### [gorm-graphql](https://github.com/grails/gorm-graphql/)
133139
134140
**Core Library** - The GORM GraphQL library provides functionality to generate a GraphQL schema based on your GORM entities. In addition to mapping domain classes to a GraphQL schema, the core library also provides default implementations of "data fetchers" to query, update, and delete data through executions of the schema.
135141
136-
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
142+
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
137143
138144
- Provides a controller to receive and respond to GraphQL requests through HTTP, based on their guidelines.
139145
- Generates the schema at startup with spring bean configuration to make it easy to extend.
@@ -143,7 +149,7 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
143149
144150
See [the documentation](https://grails.github.io/gorm-graphql/latest/guide/index.html) for more information.
145151
146-
#### [GQL](https://grooviter.github.io/gql/)
152+
#### [GQL](https://grooviter.github.io/gql/)
147153
148154
GQL is a Groovy library for GraphQL
149155
@@ -264,43 +270,43 @@ A set of GraphQL server packages from Apollo that work with various Node.js HTTP
264270
To run a hello world server with apollo-server-express:
265271
266272
\`\`\`bash
267-
npm install apollo-server-express body-parser express graphql graphql-tools
273+
npm install apollo-server-express express
268274
\`\`\`
269275
270276
Then run \`node server.js\` with this code in \`server.js\`:
271277
272278
\`\`\`js
273-
var express = require('express');
274-
var bodyParser = require('body-parser');
275-
var { graphqlExpress, graphiqlExpress } = require('apollo-server-express');
276-
var { makeExecutableSchema } = require('graphql-tools');
277-
278-
var typeDefs = [\`
279-
type Query {
280-
hello: String
281-
}
279+
const express = require('express');
280+
const { ApolloServer, gql } = require('apollo-server-express');
282281
283-
schema {
284-
query: Query
285-
}\`];
282+
const typeDefs = gql\`
283+
type Query {
284+
hello: String
285+
}
286+
\`;
286287
287-
var resolvers = {
288+
const resolvers = {
288289
Query: {
289-
hello(root) {
290-
return 'world';
291-
}
292-
}
290+
hello: () => 'Hello world!',
291+
},
293292
};
294293
295-
var schema = makeExecutableSchema({typeDefs, resolvers});
296-
var app = express();
297-
app.use('/graphql', bodyParser.json(), graphqlExpress({schema}));
298-
app.use('/graphiql', graphiqlExpress({endpointURL: '/graphql'}));
299-
app.listen(4000, () => console.log('Now browse to localhost:4000/graphiql'));
294+
const server = new ApolloServer({ typeDefs, resolvers });
295+
296+
const app = express();
297+
server.applyMiddleware({ app });
298+
299+
app.listen({ port: 4000 }, () =>
300+
console.log('Now browse to http://localhost:4000' + server.graphqlPath)
301+
);
300302
\`\`\`
301303
302304
Apollo Server also supports all Node.js HTTP server frameworks: Express, Connect, HAPI and Koa.
303305
306+
### Kotlin
307+
308+
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin/): A set of libraries for running GraphQL server in Kotlin.
309+
304310
### PHP
305311
306312
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
@@ -335,7 +341,8 @@ $resolvers = [
335341
];
336342
$schema = Graphql\schema($typeDefs, $resolvers);
337343
338-
echo "Server running at http://127.0.0.1:8080\n";
344+
echo "Server running at http://127.0.0.1:8080";
345+
339346
Http\server(Graphql\psr7($schema), function (\Throwable $err) {
340347
var_dump($err);
341348
return Diactoros\json([
@@ -394,15 +401,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
394401
\`\`\`ruby
395402
require 'graphql'
396403
397-
QueryType = GraphQL::ObjectType.define do
398-
name 'Query'
404+
class QueryType < GraphQL::Schema::Object
405+
graphql_name 'Query'
399406
field :hello do
400407
type types.String
401408
resolve -> (obj, args, ctx) { 'Hello world!' }
402409
end
403410
end
404411
405-
Schema = GraphQL::Schema.define do
412+
class Schema < GraphQL::Schema
406413
query QueryType
407414
end
408415
@@ -411,6 +418,10 @@ puts Schema.execute('{ hello }').to_json
411418
412419
There are also nice bindings for Relay and Rails.
413420
421+
### Rust
422+
423+
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
424+
414425
### Scala
415426
416427
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).
@@ -437,6 +448,7 @@ Executor.execute(schema, query) map println
437448
438449
- [C# / .NET](#c-net-1)
439450
- [Clojurescript](#clojurescript-1)
451+
- [Flutter](#flutter)
440452
- [Go](#go-1)
441453
- [Java / Android](#java-android)
442454
- [JavaScript](#javascript-1)
@@ -453,6 +465,10 @@ Executor.execute(schema, query) map println
453465
454466
- [re-graph](https://github.com/oliyh/re-graph/): A GraphQL client implemented in Clojurescript with support for websockets.
455467
468+
### Flutter
469+
470+
- [graphql](https://github.com/zino-app/graphql-flutter#readme): A GraphQL client implementation in Flutter.
471+
456472
### Go
457473
458474
- [graphql](https://github.com/shurcooL/graphql#readme): A GraphQL client implementation in Go.
@@ -467,12 +483,13 @@ Executor.execute(schema, query) map println
467483
468484
- [Relay](https://facebook.github.io/relay/) ([github](https://github.com/facebook/relay)) ([npm](https://www.npmjs.com/package/react-relay)): Facebook's framework for building React applications that talk to a GraphQL backend.
469485
- [Apollo Client](http://apollographql.com/client/) ([github](https://github.com/apollographql/apollo-client)): A powerful JavaScript GraphQL client, designed to work well with React, React Native, Angular 2, or just plain JavaScript.
470-
- [graphql-request](https://github.com/graphcool/graphql-request): A simple and flexible JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native) - basically a lightweight wrapper around \`fetch\`.
486+
- [graphql-request](https://github.com/prisma/graphql-request): A simple and flexible JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native) - basically a lightweight wrapper around \`fetch\`.
471487
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
472488
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
473489
- [gq-loader](https://github.com/Houfeng/gq-loader): A simple JavaScript GraphQL client,Let the *.gql file be used as a module through webpack loader.
474490
- [AWS Amplify](https://aws.github.io/aws-amplify): A JavaScript library for application development using cloud services, which supports GraphQL backend and React components for working with GraphQL data.
475491
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
492+
- [urql](https://formidable.com/open-source/urql/) ([github](https://github.com/FormidableLabs/urql)): A highly customizable and versatile GraphQL client for React.
476493
477494
### Swift / Objective-C iOS
478495
@@ -482,7 +499,7 @@ Executor.execute(schema, query) map println
482499
### Python
483500
484501
- [GQL](https://github.com/graphql-python/gql): A GraphQL client in Python.
485-
- [python-graphql-client](https://github.com/graphcool/python-graphql-client): Simple GraphQL client for Python 2.7+.
502+
- [python-graphql-client](https://github.com/prisma/python-graphql-client): Simple GraphQL client for Python 2.7+.
486503
- [sgqlc](https://github.com/profusion/sgqlc): A simple Python GraphQL client. Supports generating code generation for types defined in a GraphQL schema.
487504
488505
## Tools
@@ -496,7 +513,7 @@ Executor.execute(schema, query) map println
496513
497514
- [Apollo Engine](http://www.apollographql.com/engine/): A service for monitoring the performance and usage of your GraphQL backend.
498515
- [GraphCMS](https://graphcms.com/): A BaaS (Backend as a Service) that sets you up with a GraphQL backend as well as tools for content editors to work with the stored data.
499-
- [Graphcool](https://www.graph.cool) ([github](https://github.com/graphcool)): A BaaS (Backend as a Service) providing a GraphQL backend for your applications with a powerful web ui for managing your database and stored data.
516+
- [Prisma](https://www.prisma.io) ([github](https://github.com/prisma)): A BaaS (Backend as a Service) providing a GraphQL backend for your applications with a powerful web ui for managing your database and stored data.
500517
- [Reindex](https://www.reindex.io/baas/) ([github](https://github.com/reindexio/reindex-js)): A BaaS (Backend as a Service) that sets you up with a GraphQL backend targeted at applications using React and Relay.
501518
- [Scaphold](https://scaphold.io) ([github](https://github.com/scaphold-io)): A BaaS (Backend as a Service) that sets you up with a GraphQL backend for your applications with many different integrations.
502519
- [Tipe](https://tipe.io) ([github](https://github.com/tipeio)): A SaaS (Software as a Service) content management system that allows you to create your content with powerful editing tools and access it from anywhere with a GraphQL or REST API.

site/codeofconduct/CodeOfConduct.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Code of Conduct
3+
layout: ../_core/DocsLayout
4+
category: Code Of Conduct
5+
permalink: /codeofconduct/
6+
---
7+
8+
# GraphQL Code of Conduct v1.0
9+
10+
## Our Pledge
11+
12+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
13+
14+
## Our Standards
15+
16+
Examples of behavior that contributes to creating a positive environment include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others’ private information, such as a physical or electronic address, without explicit permission
30+
* Other conduct which could reasonably be considered inappropriate in a professional setting
31+
32+
## Our Responsibilities
33+
34+
GraphQL Specification members, project participants and contributors (collectively, "participants") are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
35+
36+
The steering committee of the GraphQL Specification has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any participant for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
37+
38+
All participants have determined that The Linux Foundation is the most optimal organization to shepherd the development of this project. Participants acknowledge and agree to The Linux Foundation's exclusive right to use "GraphQL" and any other names and trademarks associated with the GraphQL open source project and GraphQL Specification and to authorize others’ use of the marks, establish guidelines for such use, and to delegate these responsibilities. Participants agree not to take any action inconsistent with such rights and to cooperate in any action which The Linux Foundation deems necessary or desirable to prevent confusion or establish or preserve these rights. Participants will not independently adopt, use, or attempt to register any trademarks or trade names that are confusingly similar to these names.
39+
40+
## Scope
41+
42+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Executive Director, or, if the complaint involves the Executive Director, a member of the steering committee. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Participants who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by the steering committee.
47+
48+
## Attribution
49+
50+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html). For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq)

0 commit comments

Comments
 (0)