2017 © Pedro Peláez
 

library pho-compiler

Compiles GraphQL schema into PHP classes for use in Pho stack.

image

phonetworks/pho-compiler

Compiles GraphQL schema into PHP classes for use in Pho stack.

  • Thursday, May 17, 2018
  • by esokullu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

, (*1)

Pho-Compiler

Compiles GraphQL schema into PHP executables for use throughout Phở stack., (*2)

Getting Started

Please note, this repository uses submodules, for unit tests. The recommended way to install pho-compiler is through composer., (*3)

git clone https://github.com/phonetworks/pho-compiler
git submodule init
git submodule update
composer install

Schema

Recommendations

A Phở-compatible GraphQL schema (also called a "PhoGQL" file) is advised to end with the following file extension: .pgql, (*4)

GraphQL

  • PhởGQL is built on top of GraphQL. For more information on GraphQL specs, please visit http://facebook.github.io/graphql/.
  • A PhoGQL file may include multiple entity definitions. However, it is advised to use (a) a single definition per file or (b) only a single semantically linked group of node and edge definitions per file.

Versioning

  • PhởGQL files must start with a version declaration. For version 1, the one and only version supported so far, it is # pho-graphql-schema-v1
  • This declaration must be at the very top of the file and must not be preceded by any other word or character.
  • The following regular expression pattern is used to match the version: /^#( )*pho\-graphql\-v1(\r\n|\r|\n| )+/i
  • All future versions and their patterns will be placed in the file Types.php

Types

  • A PhởGQL definition must implement one of ActorNode, GraphNode, ObjectNode or ReadEdge, SubscribeEdge, TransmitEdge, WriteEdge entities. For more information on these entities, check out pho-framework.
  • While GraphQL allows multiple inheritance, the Phở compiler will evaluate only the first interface declared in each definition.

Directives

  • Directives are case-insensitive. Similarly arguments are case-insensitive too.

Tips

  1. Start by defining the Actor edge
  2. Outgoing edges are important.
  3. Make sure all outgoing edges are done.

The Versions

17/05 2018
14/04 2018
25/01 2018

dev-documentor

dev-documentor https://phonetworks.org

Compiles GraphQL schema into PHP classes for use in Pho stack.

  Sources   Download

MIT

The Requires

 

The Development Requires

sql schema social graph graphql network data modeling graphql schema schema model

16/01 2018

v2.x-dev

2.9999999.9999999.9999999-dev https://phonetworks.org

Compiles GraphQL schema into PHP classes for use in Pho stack.

  Sources   Download

MIT

The Requires

 

The Development Requires

sql schema social graph graphql network data modeling graphql schema schema model

15/08 2017

dev-multiple_tails

dev-multiple_tails https://phonetworks.org

Compiles GraphQL schema into PHP classes for use in Pho stack.

  Sources   Download

MIT

The Requires

 

The Development Requires

sql schema social graph graphql network data modeling graphql schema schema model