Skip to content

Commit f37e489

Browse files
authored
Merge branch 'source' into source
2 parents 4f92daf + 8865126 commit f37e489

17 files changed

+3492
-30
lines changed

site/_core/HeaderLinks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ 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: 'foundation', text: 'Foundation', href: 'https://foundation.graphql.org/' },
1717
];
1818

1919
export default ({ section }) =>

site/_core/Site.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ 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>

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: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In addition to the GraphQL [reference implementations in JavaScript](#javascript
4242
4343
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
4444
- [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
45+
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .net core and .net classic
4646
4747
### Clojure
4848
@@ -107,7 +107,9 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
107107
(executor/execute nil schema resolver-fn "{ hello }")
108108
\`\`\`
109109
110-
- [lacinia](https://github.com/walmartlabs/lacinia): A full implementation of the GraphQL specification that aims to maintain external compliance with the specification.
110+
#### [lacinia](https://github.com/walmartlabs/lacinia)
111+
112+
A full implementation of the GraphQL specification that aims to maintain external compliance with the specification.
111113
112114
### Elixir
113115
@@ -121,8 +123,9 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
121123
### Go
122124
123125
- [graphql-go](https://github.com/graphql-go/graphql): An implementation of GraphQL for Go / Golang.
126+
- [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).
127+
- [GQLGen](https://github.com/99designs/gqlgen) - Go generate based graphql server library.
124128
- [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.
126129
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
127130
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
128131
@@ -334,7 +337,8 @@ $resolvers = [
334337
];
335338
$schema = Graphql\schema($typeDefs, $resolvers);
336339
337-
echo "Server running at http://127.0.0.1:8080\n";
340+
echo "Server running at http://127.0.0.1:8080";
341+
338342
Http\server(Graphql\psr7($schema), function (\Throwable $err) {
339343
var_dump($err);
340344
return Diactoros\json([
@@ -471,6 +475,7 @@ Executor.execute(schema, query) map println
471475
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
472476
- [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.
473477
- [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.
478+
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
474479
475480
### Swift / Objective-C iOS
476481

site/community/Community-Events.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ sublinks: Upcoming Events,Meetups
88

99
## Upcoming Events
1010

11-
### GraphQL Europe Conference
11+
### GraphQL Summit
1212

13-
- **Date:** June 15, 2018
14-
- **Location:** Berlin, Germany
15-
- **Link:** https://graphql-europe.org
13+
- **Date:** November 7-8, 2018
14+
- **Location:** San Francisco, U.S.A.
15+
- **Link:** https://summit.graphql.com
1616

17-
GraphQL Europe is a non-profit GraphQL conference in Europe with speakers from all around the world. Learn about GraphQL best practices from industry experts and become part of the thriving GraphQL community.
17+
World's largest conference dedicated to GraphQL.
1818

19-
### GraphQL Finland Conference
19+
### GraphQL Conf Berlin 2019
2020

21-
- **Date:** October 18-19, 2018
22-
- **Location:** Helsinki, Finland
23-
- **Link:** https://graphql-finland.fi/
21+
- **Date:** June 20-21, 2019
22+
- **Location:** Berlin, Germany
23+
- **Link:** https://www.graphqlconf.org/
2424

25-
GraphQL Finland is a community-organized GraphQL conference. The first of its kind in Finland, the event consists of a workshop day and a day of talks around the topic. GraphQL Finland is organized by the same team that brought you React Finland.
25+
GraphQL Conf is a non-profit GraphQL conference in Europe with speakers from all around the world. Learn about GraphQL best practices from industry experts and become part of the thriving GraphQL community.
2626

2727
## Meetups
2828

@@ -72,3 +72,4 @@ GraphQL Finland is a community-organized GraphQL conference. The first of its ki
7272
- [GraphQL Tel Aviv](https://www.meetup.com/GraphQL-TLV/)
7373
- [GraphQL Tokyo](https://www.meetup.com/GraphQL-Tokyo/)
7474
- [GraphQL Meetup (Bangalore)](https://www.meetup.com/GraphQL-Meetup/)
75+
- [GraphQL Meetup (Bangkok)](https://www.meetup.com/GraphQL-Bangkok/)

site/community/Community-Resources.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Use the [**#graphql** hashtag](https://twitter.com/search?q=%23GraphQL&src=tyah)
2222
Here are some helpful accounts to follow:
2323
- [@GraphQL](https://twitter.com/GraphQL)
2424
- [@graphqlweekly](https://twitter.com/graphqlweekly)
25-
- [@graphqlnews](https://twitter.com/graphqlnews)
2625
- [@GraphQLStackOverflow](https://twitter.com/GraphQLatSO)
2726
- [@apollographql](https://twitter.com/apollographql)
2827
- [@graphcool](https://twitter.com/graphcool)
@@ -51,13 +50,19 @@ Join #graphql on the [ReactiFlux Discord](http://join.reactiflux.com/).
5150

5251
Here are a list of notable blog posts to help you better understand GraphQL:
5352

53+
- [GraphQL: A data query language](/blog/graphql-a-query-language/) - Lee Byron
54+
- [Subscriptions in GraphQL and Relay](/blog/subscriptions-in-graphql-and-relay/) - Dan Schafer and Laney Kuenzel
55+
- [Mocking your server is easy with GraphQL](/blog/mocking-with-graphql/) - Jonas Helfer
56+
- [Wrapping a REST API in GraphQL](/blog/rest-api-graphql-wrapper/) - Steven Luscher
57+
- [Leaving technical preview](/blog/production-ready/) - Lee Byron
58+
- [Relicensing the GraphQL specification](https://medium.com/@leeb/relicensing-the-graphql-specification-e7d07a52301b) - Lee Byron
5459
- [GraphQL Introduction](https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html) - Nick Schrock
5560
- [From REST to GraphQL](https://0x2a.sh/from-rest-to-graphql-b4e95e94c26b#.tag7nzkrb) - Jacob Gillespie
5661
- [GraphQL Explained](https://medium.com/apollo-stack/graphql-explained-5844742f195e#.zdykxos6i) - Jonas Helfer
5762
- [GraphQL Concepts Visualized](https://medium.com/apollo-stack/the-concepts-of-graphql-bc68bd819be3#.hfczgtdsj) - Dhaivat Pandya
5863
- [Building the f8 App: Using GraphQL & Relay](http://makeitopen.com/docs/en/1-A2-relay.html)
5964
- [Your First GraphQL Server](https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2#.ovn0y19k4) - Clay Allsopp
60-
- [Tutorial: Kick start a JS API with Apollo-server, Dataloader and Knex](https://bamtech.gitbooks.io/dev-standards/content/backend/graphql-js/getting-started-with-apollo-server-dataloader-knex.mo.html) - Thomas Pucci
65+
- [Tutorial: Kick start a JS API with Apollo-server, Dataloader and Knex](https://bamtech.gitbook.io/dev-standards/backend/graphql-js/getting-started-with-apollo-server-dataloader-knex.mo) - Thomas Pucci
6166
- [Tutorial: How to Build a GraphQL Server](https://medium.com/apollo-stack/tutorial-building-a-graphql-server-cddaa023c035#.bu6sdnst4) - Jonas Helfer
6267
- [Designing Powerful APIs with GraphQL Query Parameters](https://www.graph.cool/docs/tutorials/designing-powerful-apis-with-graphql-query-parameters-aing7uech3/) - Johannes Schickling
6368
- [GraphQL and the amazing Apollo Client](https://medium.com/google-developer-experts/graphql-and-the-amazing-apollo-client-fe57e162a70c) - Gerard Sans

site/google437284cc1356bc93.html.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-site-verification: google437284cc1356bc93.html

site/graphql-js/APIReference-Language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function visit(root, visitor, keyMap)
196196

197197
visit() will walk through an AST using a depth first traversal, calling
198198
the visitor's enter function at each node in the traversal, and calling the
199-
leave function after visiting that node and all of it's child nodes.
199+
leave function after visiting that node and all of its child nodes.
200200

201201
By returning different values from the enter and leave functions, the
202202
behavior of the visitor can be altered, including skipping over a sub-tree of

site/learn/BestPractice-Introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Following are brief descriptions of some of the more common best practices and o
1616

1717
### HTTP
1818

19-
GraphQL is typically served over HTTP via a single endpoint which expresses the full set of capabilities of the service. This is in contrast to REST APIs which expose a suite of URLs each of which expose a single resource. While GraphQL could be used alongside a suite of resource URLs, this can make it harder to use with tools like GraphiQL.
19+
GraphQL is typically served over HTTP via a single endpoint which expresses the full set of capabilities of the service. This is in contrast to REST APIs which expose a suite of URLs each of which expose a single resource. While GraphQL could be used alongside a suite of resource URLs, this can make it harder to use with tools like [GraphiQL](https://github.com/graphql/graphiql).
2020

2121
Read more about this in [Serving over HTTP](/learn/serving-over-http/).
2222

@@ -40,12 +40,12 @@ While there's nothing that prevents a GraphQL service from being versioned just
4040

4141
Why do most APIs version? When there's limited control over the data that's returned from an API endpoint, *any change* can be considered a breaking change, and breaking changes require a new version. If adding new features to an API requires a new version, then a tradeoff emerges between releasing often and having many incremental versions versus the understandability and maintainability of the API.
4242

43-
In contrast, GraphQL only returns the data that's explicitly requested, so new capabilities can be added via new types and new fields on those types without creating a breaking change. This has lead to a common practice of always avoiding breaking changes and serving a versionless API.
43+
In contrast, GraphQL only returns the data that's explicitly requested, so new capabilities can be added via new types and new fields on those types without creating a breaking change. This has led to a common practice of always avoiding breaking changes and serving a versionless API.
4444

4545

4646
### Nullability
4747

48-
Most type systems which recognise "null" provide both the common type, and the *nullable* version of that type, where by default types do not include "null" unless explicitly declared. However in a GraphQL type system, every field is *nullable* by default. This is because there are many things which can go awry in a networked service backed by databases and other services. A database could go down, an asynchronous action could fail, an exception could be thrown. Beyond simply system failures, authorization can often be granular, where individual fields within a request can have different authorization rules.
48+
Most type systems which recognise "null" provide both the common type, and the *nullable* version of that type, whereby default types do not include "null" unless explicitly declared. However in a GraphQL type system, every field is *nullable* by default. This is because there are many things which can go awry in a networked service backed by databases and other services. A database could go down, an asynchronous action could fail, an exception could be thrown. Beyond simply system failures, authorization can often be granular, where individual fields within a request can have different authorization rules.
4949

5050
By defaulting every field to *nullable*, any of these reasons may result in just that field returned "null" rather than having a complete failure for the request. Instead, GraphQL provides [non-null](/learn/schema/#lists-and-non-null) variants of types which make a guarantee to clients that if requested, the field will never return "null". Instead, if an error occurs, the previous parent field will be "null" instead.
5151

site/learn/Learn-Execution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This example is written in JavaScript, however GraphQL servers can be built in [
7373
- `obj` The previous object, which for a field on the root Query type is often not used.
7474
- `args` The arguments provided to the field in the GraphQL query.
7575
- `context` A value which is provided to every resolver and holds important contextual information like the currently logged in user, or access to a database.
76-
- `info` A value which holds field-specific information relevant to the current query as well as the schema details, also [refer type GraphQLResolveInfo for more details](/graphql-js/type/#graphqlobjecttype).
76+
- `info` A value which holds field-specific information relevant to the current query as well as the schema details, also refer to [type GraphQLResolveInfo for more details](/graphql-js/type/#graphqlobjecttype).
7777

7878
## Asynchronous resolvers
7979

site/learn/Learn-Queries.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,34 @@ fragment comparisonFields on Character {
124124

125125
You can see how the above query would be pretty repetitive if the fields were repeated. The concept of fragments is frequently used to split complicated application data requirements into smaller chunks, especially when you need to combine lots of UI components with different fragments into one initial data fetch.
126126

127+
### Using variables inside fragments
128+
129+
It is possible for fragments to access variables declared in the query or mutation. See [variables](#variables).
130+
131+
```graphql
132+
# { "graphiql": true }
133+
query HeroComparison($first: Int = 3) {
134+
leftComparison: hero(episode: EMPIRE) {
135+
...comparisonFields
136+
}
137+
rightComparison: hero(episode: JEDI) {
138+
...comparisonFields
139+
}
140+
}
141+
142+
fragment comparisonFields on Character {
143+
name
144+
friendsConnection(first: $first) {
145+
totalCount
146+
edges {
147+
node {
148+
name
149+
}
150+
}
151+
}
152+
}
153+
```
154+
127155
## Operation name
128156

129157
Up until now, we have been using a shorthand syntax where we omit both the `query` keyword and the query name, but in production apps it's useful to use these to make our code less ambiguous.

site/learn/Learn-Schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The most basic components of a GraphQL schema are object types, which just repre
4242
```graphql
4343
type Character {
4444
name: String!
45-
appearsIn: [Episode]!
45+
appearsIn: [Episode!]!
4646
}
4747
```
4848

@@ -52,7 +52,7 @@ The language is pretty readable, but let's go over it so that we can have a shar
5252
- `name` and `appearsIn` are _fields_ on the `Character` type. That means that `name` and `appearsIn` are the only fields that can appear in any part of a GraphQL query that operates on the `Character` type.
5353
- `String` is one of the built-in _scalar_ types - these are types that resolve to a single scalar object, and can't have sub-selections in the query. We'll go over scalar types more later.
5454
- `String!` means that the field is _non-nullable_, meaning that the GraphQL service promises to always give you a value when you query this field. In the type language, we'll represent those with an exclamation mark.
55-
- `[Episode]!` represents an _array_ of `Episode` objects. Since it is also _non-nullable_, you can always expect an array (with zero or more items) when you query the `appearsIn` field.
55+
- `[Episode!]!` represents an _array_ of `Episode` objects. Since it is also _non-nullable_, you can always expect an array (with zero or more items) when you query the `appearsIn` field. And since `Episode!` is also _non-nullable_, you can always expect every item of the array to be an `Episode` object.
5656

5757
Now you know what a GraphQL object type looks like, and how to read the basics of the GraphQL type language.
5858

site/users/index.html.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,16 @@ var logos = [
656656
img: 'uctrends.png',
657657
link: 'https://trends.ucweb.com'
658658
},
659+
{
660+
name: 'Expert360',
661+
img: 'expert360.png',
662+
link: 'https://expert360.com'
663+
},
664+
{
665+
name: 'Cloverleaf',
666+
img: 'cloverleaf.png',
667+
link: 'https://cloverleaf.me/'
668+
},
659669
{
660670
name: 'Memair',
661671
img: 'memair.png',

site/users/logos/cloverleaf.png

12.3 KB
Loading
File renamed without changes.

site/users/logos/expert360.png

7.18 KB
Loading

0 commit comments

Comments
 (0)