Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
crisu83 committed Feb 25, 2018
1 parent 02c356f commit eae1bab
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A PHP7 implementation of the [GraphQL specification](http://facebook.github.io/g

## Requirements

- PHP version >= 7.1
- PHP version >= 7.1 (this might change to >= 7.0 before the first release)

## Motivation

Expand All @@ -29,6 +29,16 @@ Takes care of executing operation against a GraphQL schema.

**Package lead: [@hungneox](https://github.com/hungneox/)**

#### Resolving

Resolving data is a major part of any GraphQL implementation. We spent quite a lot of time planning how we would solve
this issue in a way that is easy to build on. The current plan is to use the Front Controller pattern and a front
resolver which maps each operation to a corresponding resolver class, very much like a modern router would.

The way this work in practice is that we need to resolve the result for an operation we call the resolver method on
the front resolver after which it finds the correct resolver, calls it resolver and returns the result. This approach
also allows us to support middleware for resolver, which is very handy for e.g. transformation or authorization checks.

### Language

Defines the GraphQL language and the associated AST.
Expand All @@ -37,8 +47,8 @@ Defines the GraphQL language and the associated AST.

#### Parsing

The plan is to encourage developers to use the official GraphQL parser written C++ through a PHP extension because
its performance is outstanding. However, we will also provide a shim for the parser, which allows developers to use
We want to encourage developers to use the official GraphQL parser written C++ through a PHP extension because its
performance is outstanding. However, we will also provide a shim for the parser, which will allow developers to use
this library without installing a custom PHP extension in their environment.

The official GraphQL parser takes a GQL string as its input and returns the corresponding Abstract Syntax Tree (AST),
Expand All @@ -61,10 +71,11 @@ Describes the GraphQL type system and schema definition.

#### Schema definition

Most of the existing GraphQL implementations require the developer to create the schema programmatically. However,
GraphQL has an experimental featured which lets you define your schema using its schema definition language. We think
that this is the natural way to define the schema, so we built type system around this idea. This approach will also
allow developers to define the schema in formats native to different ecosystems, such as PHP array, YAML and even XML.
Most of the existing GraphQL implementations encourages the developer to create the schema programmatically. However,
GraphQL has an experimental featured which lets you define your schema using its Schema Definition Language (SDL). We
think that this is the natural way to define the schema, so we built our type system around this idea. This approach
will also allow developers to define the schema in formats native to different ecosystems, such as PHP array, YAML and
even XML.

## Usage

Expand Down

0 comments on commit eae1bab

Please sign in to comment.