Skip to content

Commit 10a1377

Browse files
authored
Merge branch 'source' into patch-1
2 parents 7b5ba4e + 81e28d2 commit 10a1377

16 files changed

+236
-755
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: 117 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,47 @@ 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
43-
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
45+
#### [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
46+
47+
\`\`\`csharp
48+
using System;
49+
using GraphQL;
50+
using GraphQL.Types;
51+
52+
public class Program
53+
{
54+
public static void Main(string[] args)
55+
{
56+
var schema = Schema.For(@"
57+
type Query {
58+
hello: String
59+
}
60+
");
61+
62+
var json = schema.Execute(_ =>
63+
{
64+
_.Query = "{ hello }";
65+
_.Root = new { Hello = "Hello World!" };
66+
});
67+
68+
Console.WriteLine(json);
69+
}
70+
}
71+
\`\`\`
72+
4473
- [graphql-net](https://github.com/ckimes89/graphql-net): Convert GraphQL to IQueryable
45-
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .net core and .net classic
4674
- [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)
4775
- [DotNetGraphQLQueryGen](https://github.com/lukemurray/DotNetGraphQLQueryGen): .NET Core library to generate classes from a GraphQL schema for type-safe querying in dotnet
76+
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .NET core and .NET classic
4877
4978
### Clojure
5079
@@ -130,14 +159,16 @@ A full implementation of the GraphQL specification that aims to maintain externa
130159
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
131160
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
132161
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
162+
- [99designs/gqlgen](https://github.com/99designs/gqlgen): A schema first GraphQL server generation.
163+
- [appointy/jaal](https://github.com/appointy/jaal): Develop spec compliant GraphQL servers in Go.
133164
134-
### Groovy
165+
### Groovy
135166
136167
#### [gorm-graphql](https://github.com/grails/gorm-graphql/)
137168
138169
**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.
139170
140-
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
171+
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
141172
142173
- Provides a controller to receive and respond to GraphQL requests through HTTP, based on their guidelines.
143174
- Generates the schema at startup with spring bean configuration to make it easy to extend.
@@ -147,7 +178,7 @@ A full implementation of the GraphQL specification that aims to maintain externa
147178
148179
See [the documentation](https://grails.github.io/gorm-graphql/latest/guide/index.html) for more information.
149180
150-
#### [GQL](https://grooviter.github.io/gql/)
181+
#### [GQL](https://grooviter.github.io/gql/)
151182
152183
GQL is a Groovy library for GraphQL
153184
@@ -179,7 +210,7 @@ public class HelloWorld {
179210
SchemaParser schemaParser = new SchemaParser();
180211
TypeDefinitionRegistry typeDefinitionRegistry = schemaParser.parse(schema);
181212
182-
RuntimeWiring runtimeWiring = newRuntimeWiring()
213+
RuntimeWiring runtimeWiring = new RuntimeWiring()
183214
.type("Query", builder -> builder.dataFetcher("hello", new StaticDataFetcher("world")))
184215
.build();
185216
@@ -268,47 +299,86 @@ A set of GraphQL server packages from Apollo that work with various Node.js HTTP
268299
To run a hello world server with apollo-server-express:
269300
270301
\`\`\`bash
271-
npm install apollo-server-express body-parser express graphql graphql-tools
302+
npm install apollo-server-express express
272303
\`\`\`
273304
274305
Then run \`node server.js\` with this code in \`server.js\`:
275306
276307
\`\`\`js
277-
var express = require('express');
278-
var bodyParser = require('body-parser');
279-
var { graphqlExpress, graphiqlExpress } = require('apollo-server-express');
280-
var { makeExecutableSchema } = require('graphql-tools');
281-
282-
var typeDefs = [\`
283-
type Query {
284-
hello: String
285-
}
308+
const express = require('express');
309+
const { ApolloServer, gql } = require('apollo-server-express');
286310
287-
schema {
288-
query: Query
289-
}\`];
311+
const typeDefs = gql\`
312+
type Query {
313+
hello: String
314+
}
315+
\`;
290316
291-
var resolvers = {
317+
const resolvers = {
292318
Query: {
293-
hello(root) {
294-
return 'world';
295-
}
296-
}
319+
hello: () => 'Hello world!',
320+
},
297321
};
298322
299-
var schema = makeExecutableSchema({typeDefs, resolvers});
300-
var app = express();
301-
app.use('/graphql', bodyParser.json(), graphqlExpress({schema}));
302-
app.use('/graphiql', graphiqlExpress({endpointURL: '/graphql'}));
303-
app.listen(4000, () => console.log('Now browse to localhost:4000/graphiql'));
323+
const server = new ApolloServer({ typeDefs, resolvers });
324+
325+
const app = express();
326+
server.applyMiddleware({ app });
327+
328+
app.listen({ port: 4000 }, () =>
329+
console.log('Now browse to http://localhost:4000' + server.graphqlPath)
330+
);
304331
\`\`\`
305332
306333
Apollo Server also supports all Node.js HTTP server frameworks: Express, Connect, HAPI and Koa.
307334
335+
### Kotlin
336+
337+
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin/): A set of libraries for running GraphQL server in Kotlin.
338+
308339
### PHP
309340
310341
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
311342
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php): A library to help construct a graphql-php server supporting react-relay.
343+
- [Lighthouse](https://github.com/nuwave/lighthouse): GraphQL Server for Laravel
344+
345+
#### [API Platform](https://api-platform.com) ([github](https://github.com/api-platform/api-platform))
346+
347+
API Platform is a fully-featured, flexible and extensible API framework built on top of Symfony.
348+
The following class is enough to create both a Relay-compatible GraphQL server and a hypermedia API supporting modern REST formats (JSON-LD, JSONAPI...):
349+
350+
\`\`\`php
351+
<?php
352+
353+
namespace App\Entity;
354+
355+
use ApiPlatform\Core\Annotation\ApiResource;
356+
use Doctrine\ORM\Mapping as ORM;
357+
358+
/**
359+
* Greet someone!
360+
*
361+
* @ApiResource
362+
* @ORM\Entity
363+
*/
364+
class Greeting
365+
{
366+
/**
367+
* @ORM\Id
368+
* @ORM\Column(type="guid")
369+
*/
370+
public $id;
371+
372+
/**
373+
* @var string Your nice message
374+
*
375+
* @ORM\Column
376+
*/
377+
public $hello;
378+
}
379+
\`\`\`
380+
381+
Other API Platform features include data validation, authentication, authorization, deprecations, cache and GraphiQL integration.
312382
313383
#### [Siler](https://siler.leocavalcante.com/graphql/) ([github](https://github.com/leocavalcante/siler))
314384
@@ -399,15 +469,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
399469
\`\`\`ruby
400470
require 'graphql'
401471
402-
QueryType = GraphQL::ObjectType.define do
403-
name 'Query'
472+
class QueryType < GraphQL::Schema::Object
473+
graphql_name 'Query'
404474
field :hello do
405475
type types.String
406476
resolve -> (obj, args, ctx) { 'Hello world!' }
407477
end
408478
end
409479
410-
Schema = GraphQL::Schema.define do
480+
class Schema < GraphQL::Schema
411481
query QueryType
412482
end
413483
@@ -416,6 +486,10 @@ puts Schema.execute('{ hello }').to_json
416486
417487
There are also nice bindings for Relay and Rails.
418488
489+
### Rust
490+
491+
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
492+
419493
### Scala
420494
421495
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).
@@ -442,6 +516,7 @@ Executor.execute(schema, query) map println
442516
443517
- [C# / .NET](#c-net-1)
444518
- [Clojurescript](#clojurescript-1)
519+
- [Flutter](#flutter)
445520
- [Go](#go-1)
446521
- [Java / Android](#java-android)
447522
- [JavaScript](#javascript-1)
@@ -458,6 +533,10 @@ Executor.execute(schema, query) map println
458533
459534
- [re-graph](https://github.com/oliyh/re-graph/): A GraphQL client implemented in Clojurescript with support for websockets.
460535
536+
### Flutter
537+
538+
- [graphql](https://github.com/zino-app/graphql-flutter#readme): A GraphQL client implementation in Flutter.
539+
461540
### Go
462541
463542
- [graphql](https://github.com/shurcooL/graphql#readme): A GraphQL client implementation in Go.
@@ -472,12 +551,13 @@ Executor.execute(schema, query) map println
472551
473552
- [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.
474553
- [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.
475-
- [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\`.
554+
- [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\`.
476555
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
477556
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
478557
- [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.
479558
- [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.
480559
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
560+
- [urql](https://formidable.com/open-source/urql/) ([github](https://github.com/FormidableLabs/urql)): A highly customizable and versatile GraphQL client for React.
481561
482562
### Swift / Objective-C iOS
483563
@@ -487,7 +567,7 @@ Executor.execute(schema, query) map println
487567
### Python
488568
489569
- [GQL](https://github.com/graphql-python/gql): A GraphQL client in Python.
490-
- [python-graphql-client](https://github.com/graphcool/python-graphql-client): Simple GraphQL client for Python 2.7+.
570+
- [python-graphql-client](https://github.com/prisma/python-graphql-client): Simple GraphQL client for Python 2.7+.
491571
- [sgqlc](https://github.com/profusion/sgqlc): A simple Python GraphQL client. Supports generating code generation for types defined in a GraphQL schema.
492572
493573
## Tools
@@ -501,12 +581,13 @@ Executor.execute(schema, query) map println
501581
502582
- [Apollo Engine](http://www.apollographql.com/engine/): A service for monitoring the performance and usage of your GraphQL backend.
503583
- [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.
504-
- [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.
584+
- [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.
505585
- [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.
506586
- [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.
507587
- [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.
508588
- [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.
509589
- [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.
590+
- [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.
510591
511592
## More Stuff
512593

0 commit comments

Comments
 (0)