Skip to content

Commit e103cd5

Browse files
authored
Merge branch 'source' into source
2 parents aa78535 + e74d407 commit e103cd5

29 files changed

+243
-137
lines changed

site/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ However, as we mentioned before, this architecture features some inherent perfor
198198
Take the next 10 minutes to watch me build a server side version of the GraphQL wrapper above using Node and Express.
199199

200200
<iframe id="ytplayer" type="text/html" width="640" height="390"
201-
src="http://github.com/%3Cspan%20class="pl-corl">http://www.youtube.com/embed/UBGzsb2UkeY?autoplay=0&origin=http://graphql.org&start=900"
201+
src="http://github.com/%3Cspan%20class="pl-corl">https://www.youtube.com/embed/UBGzsb2UkeY?autoplay=0&origin=http://graphql.org&start=900"
202202
frameborder="0"></iframe>
203203

204204
## Bonus round: A truly Relay compliant schema

site/code/index.html.js

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +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
4546
4647
### Clojure
4748
@@ -122,6 +123,8 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
122123
- [graphql-go](https://github.com/graphql-go/graphql): An implementation of GraphQL for Go / Golang.
123124
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
124125
- [neelance/graphql-go](https://github.com/neelance/graphql-go): An active implementation of GraphQL in Golang.
126+
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
127+
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
125128
126129
### Groovy
127130
@@ -302,6 +305,47 @@ Apollo Server also supports all Node.js HTTP server frameworks: Express, Connect
302305
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
303306
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php): A library to help construct a graphql-php server supporting react-relay.
304307
308+
#### [Siler](https://siler.leocavalcante.com/graphql/) ([github](https://github.com/leocavalcante/siler))
309+
310+
Siler is a PHP library powered with high-level abstractions to work with GraphQL.
311+
312+
To run a Siler hello world script:
313+
314+
\`\`\`graphql
315+
type Query {
316+
hello: String
317+
}
318+
\`\`\`
319+
320+
\`\`\`php
321+
<?php
322+
declare(strict_types=1);
323+
require_once '/path/to/vendor/autoload.php';
324+
325+
use Siler\Diactoros;
326+
use Siler\Graphql;
327+
use Siler\Http;
328+
329+
$typeDefs = file_get_contents(__DIR__.'/schema.graphql');
330+
$resolvers = [
331+
'Query' => [
332+
'hello' => 'world',
333+
],
334+
];
335+
$schema = Graphql\schema($typeDefs, $resolvers);
336+
337+
echo "Server running at http://127.0.0.1:8080\n";
338+
Http\server(Graphql\psr7($schema), function (\Throwable $err) {
339+
var_dump($err);
340+
return Diactoros\json([
341+
'error' => true,
342+
'message' => $err->getMessage(),
343+
]);
344+
})()->run();
345+
\`\`\`
346+
347+
It also provides functionality for the construction of a WebSocket Subscriptions Server based on how Apollo works.
348+
305349
### Python
306350
307351
#### [Graphene](http://graphene-python.org/) ([github](https://github.com/graphql-python/graphene))
@@ -320,14 +364,14 @@ Then run \`python hello.py\` with this code in \`hello.py\`:
320364
import graphene
321365
322366
class Query(graphene.ObjectType):
323-
hello = graphene.String()
367+
hello = graphene.String(name=graphene.String(default_value="World"))
324368
325-
def resolve_hello(self, args, context, info):
326-
return 'Hello world!'
369+
def resolve_hello(self, info, name):
370+
return 'Hello ' + name
327371
328372
schema = graphene.Schema(query=Query)
329373
result = schema.execute('{ hello }')
330-
print(result.data['hello'])
374+
print(result.data['hello']) # "Hello World"
331375
\`\`\`
332376
333377
There are also nice bindings for [Relay](https://facebook.github.io/relay/), Django, SQLAlchemy, and Google App Engine.
@@ -361,7 +405,7 @@ Schema = GraphQL::Schema.define do
361405
query QueryType
362406
end
363407
364-
puts Schema.execute('{ hello }')
408+
puts Schema.execute('{ hello }').to_json
365409
\`\`\`
366410
367411
There are also nice bindings for Relay and Rails.
@@ -391,6 +435,7 @@ Executor.execute(schema, query) map println
391435
## GraphQL Clients
392436
393437
- [C# / .NET](#c-net-1)
438+
- [Clojurescript](#clojurescript-1)
394439
- [Go](#go-1)
395440
- [Java / Android](#java-android)
396441
- [JavaScript](#javascript-1)
@@ -399,7 +444,13 @@ Executor.execute(schema, query) map println
399444
400445
### C# / .NET
401446
447+
- [GraphQL.Client](https://github.com/graphql-dotnet/graphql-client): A GraphQL Client for .NET.
402448
- [graphql-net-client](https://github.com/bkniffler/graphql-net-client): Basic example GraphQL client for .NET.
449+
- [SAHB.GraphQLClient](https://github.com/sahb1239/SAHB.GraphQLClient): GraphQL client which supports generating queries from C# classes
450+
451+
### Clojurescript
452+
453+
- [re-graph](https://github.com/oliyh/re-graph/): A GraphQL client implemented in Clojurescript with support for websockets.
403454
404455
### Go
405456
@@ -409,13 +460,18 @@ Executor.execute(schema, query) map println
409460
410461
- [Apollo Android](https://github.com/apollographql/apollo-android): A strongly-typed, caching GraphQL client for Android, written in Java.
411462
463+
- [Nodes](https://github.com/americanexpress/nodes): A GraphQL JVM Client designed for constructing queries from standard model definitions. By American Express.
464+
412465
### JavaScript
413466
414467
- [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.
415468
- [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.
416469
- [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\`.
417470
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
418471
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
472+
- [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.
473+
- [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.
474+
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
419475
420476
### Swift / Objective-C iOS
421477
@@ -425,12 +481,15 @@ Executor.execute(schema, query) map println
425481
### Python
426482
427483
- [GQL](https://github.com/graphql-python/gql): A GraphQL client in Python.
484+
- [python-graphql-client](https://github.com/graphcool/python-graphql-client): Simple GraphQL client for Python 2.7+.
485+
- [sgqlc](https://github.com/profusion/sgqlc): A simple Python GraphQL client. Supports generating code generation for types defined in a GraphQL schema.
428486
429487
## Tools
430488
431489
- [graphiql](https://github.com/graphql/graphiql) ([npm](https://www.npmjs.com/package/graphiql)): An interactive in-browser GraphQL IDE.
432490
- [libgraphqlparser](https://github.com/graphql/libgraphqlparser): A GraphQL query language parser in C++ with C and C++ APIs.
433491
- [Graphql Language Service](https://github.com/graphql/graphql-language-service): An interface for building GraphQL language services for IDEs (diagnostics, autocomplete etc).
492+
- [quicktype](https://quicktype.io) ([github](https://github.com/quicktype/quicktype)): Generate types for GraphQL queries in TypeScript, Swift, golang, C#, C++, and more.
434493
435494
## Services
436495
@@ -440,6 +499,8 @@ Executor.execute(schema, query) map println
440499
- [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.
441500
- [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.
442501
- [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.
502+
- [AWS AppSync](https://aws.amazon.com/appsync/): Fully managed GraphQL service with realtime subscriptions, offline programming & synchronization, and enterprise security features as well as fine grained authorization controls.
503+
- [Hasura](https://hasura.io): A BaaS (Backend as a Service) that lets you create tables, define permissions on Postgres and query and manipulate using a GraphQL interface.
443504
444505
## More Stuff
445506

site/community/Community-Events.md

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

99
## Upcoming Events
1010

11-
### GraphQL in production: KLM & Bynder cases
11+
### GraphQL Europe Conference
1212

13-
- **Date:** 10th October, 2017
14-
- **Location:** Amsterdam, The Netherlands
15-
- **Link:** https://www.meetup.com/Bynder-JS-Guild/events/242414878/
16-
17-
We'd like to share KLM and Bynder experience working on GraphQL based applications that thousands of people are using every day. Beyond basics we'll discuss: persistent queries (query whitelisting and reduced bandwidth usage); optimistic UI (make the interface respond faster); connecting React components to GraphQL with wrappers (improvements beyond default Apollo frontend implementation)... and the cherry on the cake: GraphQL Subscriptions.
18-
19-
### GraphQL Summit 2017
20-
21-
- **Date:** 25-26 October, 2017
22-
- **Location:** San Francisco, CA, USA
23-
- **Link:** http://summit.graphql.com
24-
25-
GraphQL Summit is a conference dedicated entirely to the GraphQL developer community. Speakers from all around the world will talk about GraphQL best practices, design patterns, adoption stories, GraphQL in production, and the open source ecosystem. This year there will be one track of talks over two days, as well as an afterparty and workshops. The CFP closes August 14, 2017 12:00AM PST.
26-
27-
## Past Events
28-
29-
### Relay Modern or Apollo?
30-
31-
- **Conference:** ReactNext 2017
32-
- **Date:** 10th September, 2017
33-
- **Location:** Tel Aviv, Israel
34-
- **Link:** http://react-next.com
35-
36-
New project starts. Everyone is excited. GraphQL is on the stack. Yay! Life is good! Suddenly someone pops the question. So which GraphQL Client should we use? What do you mean? Oh, nooo! =) Don’t worry I’ve got your back. In this talk I am going to put these two under the microscope and find out what are they best at, what features they share and, most importantly, what are their key differences! You can relax.
37-
38-
### Unleashing the power of GraphQL and React
39-
40-
- **Conference:** OdessaJS 2017
41-
- **Date:** 1st July, 2017
42-
- **Location:** Odessa, Ukraine
43-
- **Link:** http://odessajs.org/index_en.html
44-
45-
GraphQL is awesome! After only a year it has got a lot of attention from the community. Many implementations have emerged and it's just getting better. Is GraphQL right for you? Is it a query language or runtime? In this talk I am going to take you from 0 to hero. ;)
46-
47-
### GraphQL - The People's Query Language
48-
49-
- **Date:** 21st June, 2017
50-
- **Location:** Denver, Colorado, USA
51-
- **Link:** https://www.meetup.com/Node-js-Denver-Boulder/events/240482998/
52-
53-
In this talk, we'll discuss the history and purpose of GraphQL, common misconceptions about GraphQL, and setting up GraphQL in a Node/Express back-end. We'll also take a look at GraphQL's development tool GraphiQL and how it self-documents your resources. If you're curious about GraphQL and how to make working with relational data a breeze, join us!
54-
55-
### GraphQL-Europe Conference
56-
57-
- **Date:** 21st May, 2017
13+
- **Date:** June 15, 2018
5814
- **Location:** Berlin, Germany
5915
- **Link:** https://graphql-europe.org
6016

61-
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+
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.
6218

63-
### Workshop - Building a real-time app using GraphQL and React
19+
### GraphQL Finland Conference
6420

65-
- **Event:** GraphQL Berlin
66-
- **Date:** 22nd May, 2017
67-
- **Location:** Berlin, Germany
68-
- **Duration:** 2.5 hours
69-
- **Instructors:** Gerard Sans
70-
- **Link:** https://www.meetup.com/graphql-berlin/events/239830863
21+
- **Date:** October 18-19, 2018
22+
- **Location:** Helsinki, Finland
23+
- **Link:** https://graphql-finland.fi/
7124

72-
Everyone is excited about Subscriptions, the new real-time GraphQL feature. Curious about how you can use it past the basic app? This is your workshop! We are going to introduce the overall architecture and share our learnings while building a real-time voting app.
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.
7326

7427
## Meetups
7528

@@ -82,28 +35,40 @@ Everyone is excited about Subscriptions, the new real-time GraphQL feature. Curi
8235
- [GraphQL NYC](https://www.meetup.com/GraphQL-NYC/)
8336
- [GraphQL Atlanta](https://www.meetup.com/GraphQL-Atlanta/)
8437
- [GraphQL Austin](https://www.meetup.com/ATX-GraphQL/)
85-
- [GraphQL Miami](https://www.meetup.com/Miami-GraphQL/)
8638
- [GraphQL Los Angeles](https://www.meetup.com/Los-Angeles-GraphQL-Meetup/)
8739
- [GraphQL Dallas-Fort Worth](https://www.meetup.com/DFW-GraphQL-Meetup/)
40+
- [GraphQL Ottawa](https://www.meetup.com/GraphQL-Ottawa/)
41+
- [GraphQL Columbus](https://www.meetup.com/GraphQL-Columbus/)
42+
- [GraphQL Vancouver](https://www.meetup.com/GraphQL-Vancouver/)
43+
- [GraphQL Minneapolis](https://www.meetup.com/GraphQL-MN/)
44+
- [GraphQL Denver/Boulder](https://www.meetup.com/GraphQL-Denver-Boulder-Meetup/)
45+
- [GraphQL By the Bay (San Francisco)](https://www.meetup.com/graphql-by-the-bay/)
46+
47+
### South America
48+
49+
- [GraphQL São Paulo](https://www.meetup.com/Apollo-GraphQL/)
50+
- [GraphQL Buenos Aires](https://www.meetup.com/GraphQL-BA/)
8851

8952
### Europe
9053

9154
- [GraphQL Amsterdam](https://www.meetup.com/Amsterdam-GraphQL-Meetup/)
9255
- [GraphQL Berlin](https://www.meetup.com/graphql-berlin/)
93-
- [GraphQL Istanbul](https://www.meetup.com/GraphQL-Istanbul/)
9456
- [GraphQL London](https://www.meetup.com/GraphQL-London)
9557
- [GraphQL Paris](https://www.meetup.com/GraphQL-Paris/)
9658
- [GraphQL Munich](https://www.meetup.com/GraphQL-Munich/)
9759
- [GraphQL Barcelona](https://www.meetup.com/GraphQL-Barcelona/)
9860
- [GraphQL Stockholm](https://www.meetup.com/GraphQL-Stockholm/)
9961
- [GraphQL Budapest](https://www.meetup.com/Budapest-GraphQL/)
62+
- [GraphQL Lisbon](https://www.meetup.com/GraphQL-Lisbon/)
63+
- [GraphQL Vienna](https://www.meetup.com/GraphQL-Vienna/)
10064

10165
### Australia
10266

10367
- [GraphQL Melbourne](http://graphql.melbourne/)
104-
- [GraphQL Sydney](http://graphql.sydney/)
68+
- [GraphQL Sydney](https://graphql.sydney/)
10569

10670
### Asia
10771

10872
- [GraphQL Tel Aviv](https://www.meetup.com/GraphQL-TLV/)
10973
- [GraphQL Tokyo](https://www.meetup.com/GraphQL-Tokyo/)
74+
- [GraphQL Meetup (Bangalore)](https://www.meetup.com/GraphQL-Meetup/)

site/community/Community-Resources.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Many members of the community use Stack Overflow to ask and answer questions. [R
1313

1414
## Facebook Group
1515

16-
Join the [GraphQL Facebook Group](https://www.facebook.com/groups/graphql.community/) for questions, discussion, and sharing. The GraphQL Facebook group is the preferred venue for announcements and broader discussion.
16+
Join the [GraphQL Facebook Group](https://www.facebook.com/groups/graphql.community/) sharing and discovering new content. The GraphQL Facebook group is the preferred venue for announcements and broader discussion.
1717

1818
## Twitter
1919

@@ -55,12 +55,15 @@ Here are a list of notable blog posts to help you better understand GraphQL:
5555
- [From REST to GraphQL](https://0x2a.sh/from-rest-to-graphql-b4e95e94c26b#.tag7nzkrb) - Jacob Gillespie
5656
- [GraphQL Explained](https://medium.com/apollo-stack/graphql-explained-5844742f195e#.zdykxos6i) - Jonas Helfer
5757
- [GraphQL Concepts Visualized](https://medium.com/apollo-stack/the-concepts-of-graphql-bc68bd819be3#.hfczgtdsj) - Dhaivat Pandya
58-
- [Building the f8 App: Using GraphQL & Relay](http://makeitopen.com/tutorials/building-the-f8-app/relay/)
58+
- [Building the f8 App: Using GraphQL & Relay](http://makeitopen.com/docs/en/1-A2-relay.html)
5959
- [Your First GraphQL Server](https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2#.ovn0y19k4) - Clay Allsopp
6060
- [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
6161
- [Tutorial: How to Build a GraphQL Server](https://medium.com/apollo-stack/tutorial-building-a-graphql-server-cddaa023c035#.bu6sdnst4) - Jonas Helfer
6262
- [Designing Powerful APIs with GraphQL Query Parameters](https://www.graph.cool/docs/tutorials/designing-powerful-apis-with-graphql-query-parameters-aing7uech3/) - Johannes Schickling
6363
- [GraphQL and the amazing Apollo Client](https://medium.com/google-developer-experts/graphql-and-the-amazing-apollo-client-fe57e162a70c) - Gerard Sans
64+
- [GraphQL Server Basics (Part I): The Schema](https://blog.graph.cool/graphql-server-basics-the-schema-ac5e2950214e) - Nikolas Burk
65+
- [GraphQL Server Basics (Part II): The Network Layer](https://blog.graph.cool/graphql-server-basics-the-network-layer-51d97d21861) - Nikolas Burk
66+
- [GraphQL Server Basics (Part III): Demystifying the `info` argument in GraphQL resolvers](https://blog.graph.cool/graphql-server-basics-demystifying-the-info-argument-in-graphql-resolvers-6f26249f613a) - Nikolas Burk
6467

6568
## Videos
6669

@@ -89,9 +92,15 @@ Developers inside and outside of Facebook have given talks about GraphQL at conf
8992
- [Unleashing the power of GraphQL using Angular 2](https://www.youtube.com/watch?v=VYpJ9pfugM8) - Gerard Sans, NG-BE 2016
9093
- [Webinar Series: GraphQL Around The World](https://graphql-world.com/webinar) - Vince Ning & Michael Paris
9194
- [All Talks from GraphQL Europe](https://www.youtube.com/playlist?list=PLn2e1F9Rfr6n_WFm9fPE-_wYPrYvSTySt) - Lee Byron, Sashko Stubailo, Dan Schafer, Johannes Schickling and many more
95+
- [Learning GraphQL with React and Relay](https://www.packtpub.com/application-development/learning-graphql-react-and-relay-video) by Divyendu Singh
96+
- [Hands-on GraphQL for Better RESTful Web Services (Video)](https://www.packtpub.com/application-development/hands-graphql-better-restful-web-services-video) by Ashwin Hegde
9297

9398
## Books
9499

100+
- [The GraphQL Guide](https://graphql.guide) by John Resig and Loren Sands-Ramshaw
101+
- [Learning GraphQL](https://www.amazon.com/Learning-GraphQL-Declarative-Fetching-Modern/dp/1492030716/) by Eve Porcello and Alex Banks
102+
- [Fullstack GraphQL](https://www.graphql.college/fullstack-graphql) by Julian Mayorga
103+
- [Craft GraphQL APIs in Elixir with Absinthe](https://pragprog.com/book/wwgraphql/craft-graphql-apis-in-elixir-with-absinthe) by Bruce Williams and Ben Wilson
95104
- [Learning GraphQL and Relay](https://www.packtpub.com/web-development/learning-graphql-and-relay) by Samer Buna
96105

97106
## More Resources

site/graphql-js/APIReference-Errors.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ class GraphQLError extends Error {
5555
nodes?: Array<any>,
5656
stack?: ?string,
5757
source?: Source,
58-
positions?: Array<number>
58+
positions?: Array<number>,
59+
originalError?: ?Error,
60+
extensions?: ?{ [key: string]: mixed }
5961
)
6062
}
6163
```

site/graphql-js/APIReference-Execution.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export function execute(
3838
contextValue?: mixed,
3939
variableValues?: ?{[key: string]: mixed},
4040
operationName?: ?string
41-
): Promise<ExecutionResult>
41+
): MaybePromise<ExecutionResult>
42+
43+
type MaybePromise<T> = Promise<T> | T;
4244

4345
type ExecutionResult = {
4446
data: ?Object;

0 commit comments

Comments
 (0)