All Projects → dosten → Graphql Parser Php

dosten / Graphql Parser Php

Licence: mit
A PHP extension wrapping the libgraphqlparser library for parsing GraphQL.

Projects that are alternatives of or similar to Graphql Parser Php

Learnrelay
Learn Relay - A comprehensive introduction to Relay (created by Graphcool)
Stars: ✭ 887 (+2958.62%)
Mutual labels:  graphql
Fullstack Starterkit
GraphQL first full-stack starter kit with Node, React. Powered by TypeScript
Stars: ✭ 943 (+3151.72%)
Mutual labels:  graphql
Eschool
eSchool Microservice based Solution
Stars: ✭ 29 (+0%)
Mutual labels:  graphql
Recife
A powerful MVC Framework for GraphQL
Stars: ✭ 20 (-31.03%)
Mutual labels:  graphql
Hoppscotch
👽 Open source API development ecosystem https://hoppscotch.io
Stars: ✭ 34,569 (+119103.45%)
Mutual labels:  graphql
Graphql Serverless
Sample project to guide the use of GraphQL and Serverless Architecture.
Stars: ✭ 28 (-3.45%)
Mutual labels:  graphql
Gatsby Source Github
A source plugin for Gatsby to source Github data from its GraphQL API for static builds
Stars: ✭ 15 (-48.28%)
Mutual labels:  graphql
Django Graph Api
Pythonic implementation of the GraphQL specification for the Django Web Framework.
Stars: ✭ 29 (+0%)
Mutual labels:  graphql
Project Fortis
Repository for all parts of the Fortis architecture
Stars: ✭ 27 (-6.9%)
Mutual labels:  graphql
Turbulette
😴 Turbulette - A batteries-included framework to build high performance, fully async GraphQL APIs
Stars: ✭ 29 (+0%)
Mutual labels:  graphql
Pinned Repositories
An efficient and flexible ReactJs project for getting pinned repositories using React Hook , GraphQL
Stars: ✭ 21 (-27.59%)
Mutual labels:  graphql
Magazine Website Akka
The experiment on the akkadotnet
Stars: ✭ 21 (-27.59%)
Mutual labels:  graphql
Redux Offline Examples
Examples for Redux-Offline
Stars: ✭ 28 (-3.45%)
Mutual labels:  graphql
Maple
Elixir GraphQL Client | Compile time client code generator for GraphQL APIs based on introspection queries and schema files
Stars: ✭ 20 (-31.03%)
Mutual labels:  graphql
Example Kotlin Springboot Graphql
Projeto de exemplo com API GraphQL com dois crud’s simples, utilizando Kotlin, Spring Boot, Gradle etc.
Stars: ✭ 28 (-3.45%)
Mutual labels:  graphql
Panther
Detect threats with log data and improve cloud security posture
Stars: ✭ 885 (+2951.72%)
Mutual labels:  graphql
Ecommerce
A powerful and lightweight eCommerce platform using ReactJs, Graphql, PHP, and Mysql.
Stars: ✭ 28 (-3.45%)
Mutual labels:  graphql
Registration
Powerful and extensible registration system for hackathons and other large events
Stars: ✭ 29 (+0%)
Mutual labels:  graphql
Xhprof Apm
Xhprof APM
Stars: ✭ 29 (+0%)
Mutual labels:  php-extension
Graphql Compose
Toolkit for generating complex GraphQL Schemas on Node.js
Stars: ✭ 947 (+3165.52%)
Mutual labels:  graphql

libgraphqlparser PHP bindings

Build Status

A PHP extension wrapping the libgraphqlparser library for parsing GraphQL.

Installation

Installing libgraphqlparser

You need to install libgraphqlparser before attempting to compile this extension.

$ cd deps/libgraphqlparser
$ cmake .
$ make
$ make install

Compiling the extension

$ phpize
$ ./configure
$ make
$ make install

Installing the extension

make install copies graphql.so to an appropriate location, but you still need to enable the extension in the PHP config file. To do so, edit your php.ini with the following contents: extension=graphql.so

Usage

<?php

use GraphQL\Parser;
use GraphQL\Error\ParseError;

$parser = new Parser();

try {
    $ast = $parser->parse('query { name }');
    print_r($ast);
} catch (ParseError $e) {
    echo sprintf('Parse error: %s', $e->getMessage());
}

The output will be:

Array
(
    [kind] => Document
    [loc] => Array
        (
            [start] => 1
            [end] => 15
        )

    [definitions] => Array
        (
            [0] => Array
                (
                    [kind] => OperationDefinition
                    [loc] => Array
                        (
                            [start] => 1
                            [end] => 15
                        )

                    [operation] => query
                    [name] =>
                    [variableDefinitions] =>
                    [directives] =>
                    [selectionSet] => Array
                        (
                            [kind] => SelectionSet
                            [loc] => Array
                                (
                                    [start] => 7
                                    [end] => 15
                                )

                            [selections] => Array
                                (
                                    [0] => Array
                                        (
                                            [kind] => Field
                                            [loc] => Array
                                                (
                                                    [start] => 9
                                                    [end] => 13
                                                )

                                            [alias] =>
                                            [name] => Array
                                                (
                                                    [kind] => Name
                                                    [loc] => Array
                                                        (
                                                            [start] => 9
                                                            [end] => 13
                                                        )

                                                    [value] => name
                                                )

                                            [arguments] =>
                                            [directives] =>
                                            [selectionSet] =>
                                        )

                                )

                        )

                )

        )

)

License

This extension is licensed under the MIT License, see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].