Skip to content

Commit 22973f8

Browse files
authored
Merge branch 'source' into patch-1
2 parents 13688f4 + ff120f0 commit 22973f8

22 files changed

+251
-767
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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"babel-loader": "^5.3.2",
2525
"babel-runtime": "^5.8.20",
2626
"express": "^4.13.3",
27-
"js-yaml": "^3.4.0",
27+
"js-yaml": "^3.13.1",
2828
"less": "^2.7.1",
2929
"react": "15.3.1",
3030
"react-dom": "15.3.1",

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const links = [
1313
{ section: 'code', text: 'Code', href: '/code/' },
1414
{ section: 'community', text: 'Community', href: '/community/' },
1515
{ section: 'spec', text: 'Spec', href: 'https://facebook.github.io/graphql/' },
16+
{ section: 'codeofconduct', text: 'Code of Conduct', href: '/codeofconduct/' },
1617
{ section: 'foundation', text: 'Foundation', href: 'https://foundation.graphql.org/' },
1718
];
1819

site/_core/Site.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,8 @@ export default ({ page, category, title, section, className, noSearch, children
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/code/index.html.js

Lines changed: 119 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,49 @@ 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)
3839
- [Scala](#scala)
3940
- [Swift](#swift)
4041
- [Ruby](#ruby)
42+
- [Rust](#rust)
43+
- [Scala](#scala)
4144
4245
### C# / .NET
4346
44-
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
47+
#### [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
48+
49+
\`\`\`csharp
50+
using System;
51+
using GraphQL;
52+
using GraphQL.Types;
53+
54+
public class Program
55+
{
56+
public static void Main(string[] args)
57+
{
58+
var schema = Schema.For(@"
59+
type Query {
60+
hello: String
61+
}
62+
");
63+
64+
var json = schema.Execute(_ =>
65+
{
66+
_.Query = "{ hello }";
67+
_.Root = new { Hello = "Hello World!" };
68+
});
69+
70+
Console.WriteLine(json);
71+
}
72+
}
73+
\`\`\`
74+
4575
- [graphql-net](https://github.com/ckimes89/graphql-net): Convert GraphQL to IQueryable
46-
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .net core and .net classic
76+
- [Entity GraphQL](https://github.com/lukemurray/EntityGraphQL): .NET Core GraphQL library. Compiles to IQueryable to easily expose a schema from an exsiting data model (E.g. from an Entity Framework data model)
77+
- [DotNetGraphQLQueryGen](https://github.com/lukemurray/DotNetGraphQLQueryGen): .NET Core library to generate classes from a GraphQL schema for type-safe querying in dotnet
78+
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .NET core and .NET classic
4779
4880
### Clojure
4981
@@ -129,14 +161,16 @@ A full implementation of the GraphQL specification that aims to maintain externa
129161
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
130162
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
131163
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
164+
- [99designs/gqlgen](https://github.com/99designs/gqlgen): A schema first GraphQL server generation.
165+
- [appointy/jaal](https://github.com/appointy/jaal): Develop spec compliant GraphQL servers in Go.
132166
133-
### Groovy
167+
### Groovy
134168
135169
#### [gorm-graphql](https://github.com/grails/gorm-graphql/)
136170
137171
**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.
138172
139-
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
173+
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
140174
141175
- Provides a controller to receive and respond to GraphQL requests through HTTP, based on their guidelines.
142176
- Generates the schema at startup with spring bean configuration to make it easy to extend.
@@ -146,7 +180,7 @@ A full implementation of the GraphQL specification that aims to maintain externa
146180
147181
See [the documentation](https://grails.github.io/gorm-graphql/latest/guide/index.html) for more information.
148182
149-
#### [GQL](https://grooviter.github.io/gql/)
183+
#### [GQL](https://grooviter.github.io/gql/)
150184
151185
GQL is a Groovy library for GraphQL
152186
@@ -178,7 +212,7 @@ public class HelloWorld {
178212
SchemaParser schemaParser = new SchemaParser();
179213
TypeDefinitionRegistry typeDefinitionRegistry = schemaParser.parse(schema);
180214
181-
RuntimeWiring runtimeWiring = newRuntimeWiring()
215+
RuntimeWiring runtimeWiring = new RuntimeWiring()
182216
.type("Query", builder -> builder.dataFetcher("hello", new StaticDataFetcher("world")))
183217
.build();
184218
@@ -267,47 +301,86 @@ A set of GraphQL server packages from Apollo that work with various Node.js HTTP
267301
To run a hello world server with apollo-server-express:
268302
269303
\`\`\`bash
270-
npm install apollo-server-express body-parser express graphql graphql-tools
304+
npm install apollo-server-express express
271305
\`\`\`
272306
273307
Then run \`node server.js\` with this code in \`server.js\`:
274308
275309
\`\`\`js
276-
var express = require('express');
277-
var bodyParser = require('body-parser');
278-
var { graphqlExpress, graphiqlExpress } = require('apollo-server-express');
279-
var { makeExecutableSchema } = require('graphql-tools');
310+
const express = require('express');
311+
const { ApolloServer, gql } = require('apollo-server-express');
280312
281-
var typeDefs = [\`
282-
type Query {
283-
hello: String
284-
}
285-
286-
schema {
287-
query: Query
288-
}\`];
313+
const typeDefs = gql\`
314+
type Query {
315+
hello: String
316+
}
317+
\`;
289318
290-
var resolvers = {
319+
const resolvers = {
291320
Query: {
292-
hello(root) {
293-
return 'world';
294-
}
295-
}
321+
hello: () => 'Hello world!',
322+
},
296323
};
297324
298-
var schema = makeExecutableSchema({typeDefs, resolvers});
299-
var app = express();
300-
app.use('/graphql', bodyParser.json(), graphqlExpress({schema}));
301-
app.use('/graphiql', graphiqlExpress({endpointURL: '/graphql'}));
302-
app.listen(4000, () => console.log('Now browse to localhost:4000/graphiql'));
325+
const server = new ApolloServer({ typeDefs, resolvers });
326+
327+
const app = express();
328+
server.applyMiddleware({ app });
329+
330+
app.listen({ port: 4000 }, () =>
331+
console.log('Now browse to http://localhost:4000' + server.graphqlPath)
332+
);
303333
\`\`\`
304334
305335
Apollo Server also supports all Node.js HTTP server frameworks: Express, Connect, HAPI and Koa.
306336
337+
### Kotlin
338+
339+
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin/): A set of libraries for running GraphQL server in Kotlin.
340+
307341
### PHP
308342
309343
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
310344
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php): A library to help construct a graphql-php server supporting react-relay.
345+
- [Lighthouse](https://github.com/nuwave/lighthouse): GraphQL Server for Laravel
346+
347+
#### [API Platform](https://api-platform.com) ([github](https://github.com/api-platform/api-platform))
348+
349+
API Platform is a fully-featured, flexible and extensible API framework built on top of Symfony.
350+
The following class is enough to create both a Relay-compatible GraphQL server and a hypermedia API supporting modern REST formats (JSON-LD, JSONAPI...):
351+
352+
\`\`\`php
353+
<?php
354+
355+
namespace App\Entity;
356+
357+
use ApiPlatform\Core\Annotation\ApiResource;
358+
use Doctrine\ORM\Mapping as ORM;
359+
360+
/**
361+
* Greet someone!
362+
*
363+
* @ApiResource
364+
* @ORM\Entity
365+
*/
366+
class Greeting
367+
{
368+
/**
369+
* @ORM\Id
370+
* @ORM\Column(type="guid")
371+
*/
372+
public $id;
373+
374+
/**
375+
* @var string Your nice message
376+
*
377+
* @ORM\Column
378+
*/
379+
public $hello;
380+
}
381+
\`\`\`
382+
383+
Other API Platform features include data validation, authentication, authorization, deprecations, cache and GraphiQL integration.
311384
312385
#### [Siler](https://siler.leocavalcante.com/graphql/) ([github](https://github.com/leocavalcante/siler))
313386
@@ -402,15 +475,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
402475
\`\`\`ruby
403476
require 'graphql'
404477
405-
QueryType = GraphQL::ObjectType.define do
406-
name 'Query'
478+
class QueryType < GraphQL::Schema::Object
479+
graphql_name 'Query'
407480
field :hello do
408481
type types.String
409482
resolve -> (obj, args, ctx) { 'Hello world!' }
410483
end
411484
end
412485
413-
Schema = GraphQL::Schema.define do
486+
class Schema < GraphQL::Schema
414487
query QueryType
415488
end
416489
@@ -419,6 +492,10 @@ puts Schema.execute('{ hello }').to_json
419492
420493
There are also nice bindings for Relay and Rails.
421494
495+
### Rust
496+
497+
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
498+
422499
### Scala
423500
424501
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).
@@ -445,6 +522,7 @@ Executor.execute(schema, query) map println
445522
446523
- [C# / .NET](#c-net-1)
447524
- [Clojurescript](#clojurescript-1)
525+
- [Flutter](#flutter)
448526
- [Go](#go-1)
449527
- [Java / Android](#java-android)
450528
- [JavaScript](#javascript-1)
@@ -461,6 +539,10 @@ Executor.execute(schema, query) map println
461539
462540
- [re-graph](https://github.com/oliyh/re-graph/): A GraphQL client implemented in Clojurescript with support for websockets.
463541
542+
### Flutter
543+
544+
- [graphql](https://github.com/zino-app/graphql-flutter#readme): A GraphQL client implementation in Flutter.
545+
464546
### Go
465547
466548
- [graphql](https://github.com/shurcooL/graphql#readme): A GraphQL client implementation in Go.
@@ -475,12 +557,13 @@ Executor.execute(schema, query) map println
475557
476558
- [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.
477559
- [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.
478-
- [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\`.
560+
- [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\`.
479561
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
480562
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
481563
- [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.
482564
- [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.
483565
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
566+
- [urql](https://formidable.com/open-source/urql/) ([github](https://github.com/FormidableLabs/urql)): A highly customizable and versatile GraphQL client for React.
484567
485568
### Swift / Objective-C iOS
486569
@@ -490,7 +573,7 @@ Executor.execute(schema, query) map println
490573
### Python
491574
492575
- [GQL](https://github.com/graphql-python/gql): A GraphQL client in Python.
493-
- [python-graphql-client](https://github.com/graphcool/python-graphql-client): Simple GraphQL client for Python 2.7+.
576+
- [python-graphql-client](https://github.com/prisma/python-graphql-client): Simple GraphQL client for Python 2.7+.
494577
- [sgqlc](https://github.com/profusion/sgqlc): A simple Python GraphQL client. Supports generating code generation for types defined in a GraphQL schema.
495578
496579
## Tools
@@ -504,12 +587,13 @@ Executor.execute(schema, query) map println
504587
505588
- [Apollo Engine](http://www.apollographql.com/engine/): A service for monitoring the performance and usage of your GraphQL backend.
506589
- [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.
507-
- [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.
590+
- [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.
508591
- [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.
509592
- [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.
510593
- [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.
511594
- [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.
512595
- [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.
596+
- [FaunaDB](https://docs.fauna.com/fauna/current/graphql): Create an instant GraphQL backend by importing a gql schema. The database will create relations and indexes for you, so you'll be ready to query in seconds, without writing any database code. Serverless pricing, free to get started.
513597
514598
## More Stuff
515599

0 commit comments

Comments
 (0)