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 24, 2018
1 parent 31124d8 commit f257ffb
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,58 @@
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/digiaonline/graphql-php/master/LICENSE)

A PHP7 implementation of the [GraphQL specification](http://facebook.github.io/graphql/).

## Requirements

- PHP >= 7.0

## Motivation

TODO

## Architecture

### Packages

#### Execution

Takes care of executing operation against a GraphQL schema.

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

### Language

Defines the GraphQL language and the associated AST.

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

#### 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
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)
(an associative array in PHP) as its output. Most of the GraphQL implementations (across all languages) takes a
different approach where they convert the AST directly into nodes (class instances in PHP). While this approach might
be a bit faster, it couples the parser tightly with the rest of the library, which we think is short-sighted.
Instead we decided to take a different approach, where the parser produces the AST as an associative array. This allows
the developers to switch out the bundled parser for the parser written in C++ without changing a single line of code.

#### AST representation

We also believe that all libraries should be easy to extend so we decided to introduce a builder system using the
Builder pattern for converting the AST into nodes. This approach allows developers to implement their own builders if
the specification would change in the future, without changing a single line of code in this library.

#### Type system

Describes the GraphQL type system and schema definition.

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

TODO

## Usage

TODO

0 comments on commit f257ffb

Please sign in to comment.