Skip to content

Commit 90d21f4

Browse files
authored
Merge branch 'source' into patch-1
2 parents 90b323a + 4a1826d commit 90d21f4

21 files changed

+608
-786
lines changed

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",

site/_core/HeaderLinks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const links = [
1515
{ section: 'spec', text: 'Spec', href: 'https://facebook.github.io/graphql/' },
1616
{ section: 'codeofconduct', text: 'Code of Conduct', href: '/codeofconduct/' },
1717
{ section: 'foundation', text: 'Foundation', href: 'https://foundation.graphql.org/' },
18+
{ section: 'landscape', text: 'Landscape', href: 'https://l.graphql.org/' },
1819
];
1920

2021
export default ({ section }) =>

site/_core/Site.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +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-
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>.
9592
</section>
9693
</footer>
9794

site/code/index.html.js

Lines changed: 166 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,48 @@ 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)
42+
- [Swift](#swift)
4043
4144
### C# / .NET
4245
43-
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
46+
#### [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
47+
48+
\`\`\`csharp
49+
using System;
50+
using GraphQL;
51+
using GraphQL.Types;
52+
53+
public class Program
54+
{
55+
public static void Main(string[] args)
56+
{
57+
var schema = Schema.For(@"
58+
type Query {
59+
hello: String
60+
}
61+
");
62+
63+
var json = schema.Execute(_ =>
64+
{
65+
_.Query = "{ hello }";
66+
_.Root = new { Hello = "Hello World!" };
67+
});
68+
69+
Console.WriteLine(json);
70+
}
71+
}
72+
\`\`\`
73+
4474
- [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
75+
- [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)
76+
- [DotNetGraphQLQueryGen](https://github.com/lukemurray/DotNetGraphQLQueryGen): .NET Core library to generate classes from a GraphQL schema for type-safe querying in dotnet
77+
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .NET core and .NET classic
4678
4779
### Clojure
4880
@@ -128,14 +160,16 @@ A full implementation of the GraphQL specification that aims to maintain externa
128160
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
129161
- [machinebox/graphql](https://github.com/machinebox/graphql): An elegant low-level HTTP client for GraphQL.
130162
- [samsarahq/thunder](https://github.com/samsarahq/thunder): A GraphQL implementation with easy schema building, live queries, and batching.
163+
- [99designs/gqlgen](https://github.com/99designs/gqlgen): A schema first GraphQL server generation.
164+
- [appointy/jaal](https://github.com/appointy/jaal): Develop spec compliant GraphQL servers in Go.
131165
132-
### Groovy
166+
### Groovy
133167
134168
#### [gorm-graphql](https://github.com/grails/gorm-graphql/)
135169
136170
**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.
137171
138-
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
172+
**Grails Plugin** - In a addition to the Core Library, the GORM GraphQL Grails Plugin:
139173
140174
- Provides a controller to receive and respond to GraphQL requests through HTTP, based on their guidelines.
141175
- Generates the schema at startup with spring bean configuration to make it easy to extend.
@@ -145,7 +179,7 @@ A full implementation of the GraphQL specification that aims to maintain externa
145179
146180
See [the documentation](https://grails.github.io/gorm-graphql/latest/guide/index.html) for more information.
147181
148-
#### [GQL](https://grooviter.github.io/gql/)
182+
#### [GQL](https://grooviter.github.io/gql/)
149183
150184
GQL is a Groovy library for GraphQL
151185
@@ -177,7 +211,7 @@ public class HelloWorld {
177211
SchemaParser schemaParser = new SchemaParser();
178212
TypeDefinitionRegistry typeDefinitionRegistry = schemaParser.parse(schema);
179213
180-
RuntimeWiring runtimeWiring = newRuntimeWiring()
214+
RuntimeWiring runtimeWiring = new RuntimeWiring()
181215
.type("Query", builder -> builder.dataFetcher("hello", new StaticDataFetcher("world")))
182216
.build();
183217
@@ -266,47 +300,125 @@ A set of GraphQL server packages from Apollo that work with various Node.js HTTP
266300
To run a hello world server with apollo-server-express:
267301
268302
\`\`\`bash
269-
npm install apollo-server-express body-parser express graphql graphql-tools
303+
npm install apollo-server-express express
270304
\`\`\`
271305
272306
Then run \`node server.js\` with this code in \`server.js\`:
273307
274308
\`\`\`js
275-
var express = require('express');
276-
var bodyParser = require('body-parser');
277-
var { graphqlExpress, graphiqlExpress } = require('apollo-server-express');
278-
var { makeExecutableSchema } = require('graphql-tools');
279-
280-
var typeDefs = [\`
281-
type Query {
282-
hello: String
283-
}
309+
const express = require('express');
310+
const { ApolloServer, gql } = require('apollo-server-express');
284311
285-
schema {
286-
query: Query
287-
}\`];
312+
const typeDefs = gql\`
313+
type Query {
314+
hello: String
315+
}
316+
\`;
288317
289-
var resolvers = {
318+
const resolvers = {
290319
Query: {
291-
hello(root) {
292-
return 'world';
293-
}
294-
}
320+
hello: () => 'Hello world!',
321+
},
295322
};
296323
297-
var schema = makeExecutableSchema({typeDefs, resolvers});
298-
var app = express();
299-
app.use('/graphql', bodyParser.json(), graphqlExpress({schema}));
300-
app.use('/graphiql', graphiqlExpress({endpointURL: '/graphql'}));
301-
app.listen(4000, () => console.log('Now browse to localhost:4000/graphiql'));
324+
const server = new ApolloServer({ typeDefs, resolvers });
325+
326+
const app = express();
327+
server.applyMiddleware({ app });
328+
329+
app.listen({ port: 4000 }, () =>
330+
console.log('Now browse to http://localhost:4000' + server.graphqlPath)
331+
);
302332
\`\`\`
303333
304334
Apollo Server also supports all Node.js HTTP server frameworks: Express, Connect, HAPI and Koa.
305335
336+
### Kotlin
337+
338+
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin/): A set of libraries for running GraphQL server in Kotlin.
339+
306340
### PHP
307341
308342
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
309343
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php): A library to help construct a graphql-php server supporting react-relay.
344+
- [Railt](https://github.com/railt/railt): A PHP GraphQL Framework.
345+
- [Lighthouse](https://github.com/nuwave/lighthouse): A GraphQL server for Laravel
346+
- [GraphQLBundle](https://github.com/overblog/GraphQLBundle): A GraphQL server for Symfony
347+
348+
#### [API Platform](https://api-platform.com) ([github](https://github.com/api-platform/api-platform))
349+
350+
API Platform is a fully-featured, flexible and extensible API framework built on top of Symfony.
351+
The following class is enough to create both a Relay-compatible GraphQL server and a hypermedia API supporting modern REST formats (JSON-LD, JSONAPI...):
352+
353+
\`\`\`php
354+
<?php
355+
356+
namespace App\Entity;
357+
358+
use ApiPlatform\Core\Annotation\ApiResource;
359+
use Doctrine\ORM\Mapping as ORM;
360+
361+
/**
362+
* Greet someone!
363+
*
364+
* @ApiResource
365+
* @ORM\Entity
366+
*/
367+
class Greeting
368+
{
369+
/**
370+
* @ORM\Id
371+
* @ORM\Column(type="guid")
372+
*/
373+
public $id;
374+
375+
/**
376+
* @var string Your nice message
377+
*
378+
* @ORM\Column
379+
*/
380+
public $hello;
381+
}
382+
\`\`\`
383+
384+
Other API Platform features include data validation, authentication, authorization, deprecations, cache and GraphiQL integration.
385+
386+
#### [GraphQLite](https://graphqlite.thecodingmachine.io) ([github](https://github.com/thecodingmachine/graphqlite))
387+
388+
GraphQLite is a library that offers an annotations-based syntax for GraphQL schema definition.
389+
It is framework agnostic with bindings available for Symfony and Laravel.
390+
391+
This code declares a "product" query and a "Product" Type:
392+
393+
\`\`\`php
394+
class ProductController
395+
{
396+
/**
397+
* @Query()
398+
*/
399+
public function product(string $id): Product
400+
{
401+
// Some code that looks for a product and returns it.
402+
}
403+
}
404+
405+
/**
406+
* @Type()
407+
*/
408+
class Product
409+
{
410+
/**
411+
* @Field()
412+
*/
413+
public function getName(): string
414+
{
415+
return $this->name;
416+
}
417+
// ...
418+
}
419+
\`\`\`
420+
421+
Other GraphQLite features include validation, security, error handling, loading via data-loader pattern...
310422
311423
#### [Siler](https://siler.leocavalcante.com/graphql/) ([github](https://github.com/leocavalcante/siler))
312424
@@ -350,6 +462,10 @@ Http\server(Graphql\psr7($schema), function (\Throwable $err) {
350462
351463
It also provides functionality for the construction of a WebSocket Subscriptions Server based on how Apollo works.
352464
465+
### Swift
466+
467+
- [Graphiti](https://github.com/GraphQLSwift/Graphiti): Swift library for building GraphQL schemas/types fast, safely and easily.
468+
353469
### Python
354470
355471
#### [Graphene](http://graphene-python.org/) ([github](https://github.com/graphql-python/graphene))
@@ -397,15 +513,15 @@ Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
397513
\`\`\`ruby
398514
require 'graphql'
399515
400-
QueryType = GraphQL::ObjectType.define do
401-
name 'Query'
516+
class QueryType < GraphQL::Schema::Object
517+
graphql_name 'Query'
402518
field :hello do
403519
type types.String
404520
resolve -> (obj, args, ctx) { 'Hello world!' }
405521
end
406522
end
407523
408-
Schema = GraphQL::Schema.define do
524+
class Schema < GraphQL::Schema
409525
query QueryType
410526
end
411527
@@ -414,6 +530,10 @@ puts Schema.execute('{ hello }').to_json
414530
415531
There are also nice bindings for Relay and Rails.
416532
533+
### Rust
534+
535+
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
536+
417537
### Scala
418538
419539
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).
@@ -440,6 +560,7 @@ Executor.execute(schema, query) map println
440560
441561
- [C# / .NET](#c-net-1)
442562
- [Clojurescript](#clojurescript-1)
563+
- [Flutter](#flutter)
443564
- [Go](#go-1)
444565
- [Java / Android](#java-android)
445566
- [JavaScript](#javascript-1)
@@ -460,6 +581,10 @@ Executor.execute(schema, query) map println
460581
461582
- [dillonkearns/elm-graphql](https://github.com/dillonkearns/elm-graphql): Library and command-line code generator to create type-safe Elm code for a GraphQL endpoint.
462583
584+
### Flutter
585+
586+
- [graphql](https://github.com/zino-app/graphql-flutter#readme): A GraphQL client implementation in Flutter.
587+
463588
### Go
464589
465590
- [graphql](https://github.com/shurcooL/graphql#readme): A GraphQL client implementation in Go.
@@ -474,12 +599,14 @@ Executor.execute(schema, query) map println
474599
475600
- [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.
476601
- [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.
477-
- [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\`.
602+
- [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\`.
478603
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
479604
- [nanogql](https://github.com/yoshuawuyts/nanogql): Tiny GraphQL client library using template strings.
480605
- [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.
481606
- [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.
482607
- [Grafoo](https://github.com/grafoojs/grafoo): An all purpose GraphQL client with view layer integrations for multiple frameworks in just 1.6kb.
608+
- [urql](https://formidable.com/open-source/urql/) ([github](https://github.com/FormidableLabs/urql)): A highly customizable and versatile GraphQL client for React.
609+
- [graphqurl](https://github.com/hasura/graphqurl) ([npm](https://www.npmjs.com/package/graphqurl)): curl for GraphQL with autocomplete, subscriptions and GraphiQL. Also a dead-simple universal javascript GraphQL client.
483610
484611
### Swift / Objective-C iOS
485612
@@ -489,7 +616,7 @@ Executor.execute(schema, query) map println
489616
### Python
490617
491618
- [GQL](https://github.com/graphql-python/gql): A GraphQL client in Python.
492-
- [python-graphql-client](https://github.com/graphcool/python-graphql-client): Simple GraphQL client for Python 2.7+.
619+
- [python-graphql-client](https://github.com/prisma/python-graphql-client): Simple GraphQL client for Python 2.7+.
493620
- [sgqlc](https://github.com/profusion/sgqlc): A simple Python GraphQL client. Supports generating code generation for types defined in a GraphQL schema.
494621
495622
## Tools
@@ -501,14 +628,13 @@ Executor.execute(schema, query) map println
501628
502629
## Services
503630
504-
- [Apollo Engine](http://www.apollographql.com/engine/): A service for monitoring the performance and usage of your GraphQL backend.
631+
- [Apollo Graph Manager](https://engine.apollographql.com): A cloud service for monitoring the performance and usage of your GraphQL backend.
505632
- [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.
506-
- [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.
507-
- [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.
508-
- [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.
633+
- [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.
509634
- [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.
510635
- [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.
511-
- [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.
636+
- [Hasura](https://hasura.io) ([github](https://github.com/hasura)): Hasura connects to your databases & microservices and instantly gives you a production-ready GraphQL API.
637+
- [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.
512638
513639
## More Stuff
514640

0 commit comments

Comments
 (0)