GraPHPinator ⚡ 🌐 ⚡ Easy-to-use & Fast GraphQL server implementation for PHP

Overview

GraPHPinator master 8.0 codecov

🌐 Easy-to-use & Fast GraphQL server implementation for PHP.

Introduction

Feature complete PHP implementation of GraphQL server. Its job is transformation of query string into resolved Json result for a given Schema.

  • Aims to be compliant with the latest draft of GraphQL specification.
  • Fully typesafe, and therefore minimum required PHP version is 8.0. Sacrifices a tiny bit of convenience for huge amount of clarity and safety - no random configuration arrays, no mixed types, no variable function arguments - this library doesnt try to save you from verbosity, but makes sure you always know what you've got.
  • Code first.
  • Flexible. Easy to extend with extra functionality using Modules or middleware Directives.
  • Includes some opt-in extensions which are out of scope of official specs:
    • Printer - Schema printing for GraPHPinator typesystem. GitHub release
    • Extra types - Some useful and commonly used types, both scalar or composite. GitHub release
    • Constraint directives - Typesystem directives to declare additional validation on top of GraphQL typesystem. GitHub release
    • Where directives - Executable directives to filter values in lists. GitHub release
    • Upload - Module to handle multipart-formdata requests. GitHub release
    • Query cost - Modules to limit query cost by restricting maximum depth or number of nodes. GitHub release
    • Persisted queries - Module to persist validated query in cache and improve performace of repeating queries. GitHub release
  • Includes adapters for easy integration into other PHP frameworks:
  • Project is composed of multiple smaller packages, which may be used standalone:
    • Source - Wrapper around source document. GitHub release
    • Tokenizer - Lexical analyzer of GraphQL document. GitHub release
    • Parser - Syntactic analyzer of GraphQL document. GitHub release

Installation

Install package using composer

composer require infinityloop-dev/graphpinator

Dependencies

This list excludes graphpinator sub-packages such as graphpinator-common, graphpinator-tokenizer and others.

Dependency tree of graphpinator packages and extensions

Dependency tree

How to use

Contributing

This package is relatively new, so some features might be missing. If you stumble upon something that is not included or is not compliant with the specs, please inform us by creating an issue or discussion. This is not yet another package, where issues and pull-requests lie around for months, so dont hesitate and help us improve the library.

Comments
  • Use monorepo?

    Use monorepo?

    Hey guys, I can see your GraphQL server directly depends on many other packages, and you have each of them on its own GitHub repo. That will make it difficult for your contributors to send PRs, whenever the modification comprises 2 or more packages, if they don't know their way around.

    I had my project with a similar set-up as yours (well, with over 100 packages though), and it was impossible to manage. Then I migrated the codebase into a monorepo, and use the Monorepo Builder, and now it's manageable. I highly recommend it. I have the impression you could benefit from it too.

    opened by leoloso 8
  • Split project into multiple standalone packages

    Split project into multiple standalone packages

    https://docs.github.com/en/free-pro-team@latest/github/using-git/splitting-a-subfolder-out-into-a-new-repository

    • [x] Tokenizer + Source
    • [x] Parser
    • [ ] Normalizer
    • [ ] Resolver
    • [ ] Typesystem
    • [ ] Introspection
    • [x] Printing
    • [x] Request (skipped)
    • [x] Addon types & directives
    • [x] Upload module
    Type - Enhancement Ctg - Tests | Project | Package 
    opened by peldax 3
  • Bump phpunit/phpunit from 9.5.21 to 9.5.22

    Bump phpunit/phpunit from 9.5.21 to 9.5.22

    Bumps phpunit/phpunit from 9.5.21 to 9.5.22.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [9.5.22] - 2022-08-20

    Fixed

    • #5015: Ukraine banner unreadable on black background
    • #5020: PHPUnit 9 breaks loading of PSR-0/PEAR style classes
    • #5022: ExcludeList::addDirectory() does not work correctly
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump phpstan/phpstan from 1.7.14 to 1.8.0

    Bump phpstan/phpstan from 1.7.14 to 1.8.0

    Bumps phpstan/phpstan from 1.7.14 to 1.8.0.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.8.0

    Major new features 🚀

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Improvements 🔧

    Bugfixes 🐛

    Function signature fixes 🤖

    ... (truncated)

    Commits
    • b7648d4 PHPStan 1.8.0
    • e08eff5 Collectors docs
    • f7bea8d rememberPossiblyImpureFunctionValues docs
    • 5fe9a5d Updated PHPStan to commit 59fb0a3b23c91e5b736c7b67d8a9fd075fc08211
    • 07b9dbe Update update-playground-runner.yml
    • e667a0b Skip phpstan-doctrine on PHP 7.2
    • 5f76cd2 Updated PHPStan to commit 78b12fa8fb276bb3594e1738ba92f8b3b12cdcd2
    • 5a8ccdb Update Symplify baseline
    • adb8acd Open 1.8-dev
    • 60baecd Prepare for 1.8.x by disabling some workflows on 1.7.x
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump phpstan/phpstan from 1.7.14 to 1.7.15

    Bump phpstan/phpstan from 1.7.14 to 1.7.15

    Bumps phpstan/phpstan from 1.7.14 to 1.7.15.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.7.15

    Improvements 🔧

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Bugfixes 🐛

    Function signature fixes 🤖

    • Be more specific about the XHProf sampling type (xhprof_sample_disable()) (#1436), thanks @​johnbillion!
    Commits
    • cd0202e PHPStan 1.7.15
    • cd4a8a7 Updated PHPStan to commit b1069e1d25831bec66f50577ea34ffe46d38a037
    • dbe21e4 Update playground-api
    • ad93ec4 Update website
    • 5410365 Updated PHPStan to commit e61a7822f7df7f7f11c5773a0ef7fdbb17092442
    • 710559f Updated PHPStan to commit 518b413e81776a512fd5a42c813a3641cdb8b50e
    • aa62bb5 Updated PHPStan to commit b1536e8ddbc87506aa718739624a9aa1a28fc7e0
    • 6b2fc12 Updated PHPStan to commit 8801edb5e758f30f9c3ea0ae9a4f7f2ce3d6c5d6
    • a48f5e2 Updated PHPStan to commit 1962fc7b999b561ace3654b999eedc7fb669c443
    • 9b0a6a4 Update Larastan baseline
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump phpstan/phpstan from 1.7.10 to 1.7.12

    Bump phpstan/phpstan from 1.7.10 to 1.7.12

    Bumps phpstan/phpstan from 1.7.10 to 1.7.12.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.7.12

    Improvements 🔧

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Bugfixes 🐛

    1.7.11

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    ... (truncated)

    Commits
    • 32f1077 PHPStan 1.7.12
    • cff589a Update Nextras ORM baseline
    • b580538 Update Rector baseline
    • a8c66d3 Update Larastan baseline
    • ff6e0fc Updated PHPStan to commit 98a3b07916bfba5ac0cbf79a1e7ea6417b8a656b
    • 47d0962 Updated PHPStan to commit ef8c7c37f2ab3def07860a4cdc20c7ed56758a8c
    • 5244583 Update variadic callable phpdoc example
    • f2ecfa5 Updated PHPStan to commit 0b5253d36331567b581eac3a4a3b68f9b47dd30c
    • d063973 Updated PHPStan to commit db3863aec75f2cb3d7582aade86e3a9b054a664e
    • 6433545 Updated PHPStan to commit 778308d6d5433221064a6f2c50998069eae87274
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump infection/infection from 0.26.10 to 0.26.11

    Bump infection/infection from 0.26.10 to 0.26.11

    Bumps infection/infection from 0.26.10 to 0.26.11.

    Release notes

    Sourced from infection/infection's releases.

    Use source directories for --git-diff-***

    Changed:

    • GitDiffFile: consume configured directories #1697
    • Auto-detect Github Actions CI and activate github logger accordingly #1645
    • Replace abandoned webmozart/path-util with symfony/filesystem #1693
    Commits
    • 11df4ea GitDiffFile: consume configured directories (#1697)
    • 62f52df Replace abandoned webmozart/path-util with symfony/filesystem (#1693)
    • 38004b5 Auto-detect Github Actions CI and activate github logger accordingly (#1645)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump phpstan/phpstan from 1.6.8 to 1.6.9

    Bump phpstan/phpstan from 1.6.8 to 1.6.9

    Bumps phpstan/phpstan from 1.6.8 to 1.6.9.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.6.9

    Bugfixes 🐛

    Commits
    • 8c98899 PHPStan 1.6.9
    • 02c26f3 Updated PHPStan to commit cc640d797c201b5de0ac00f8e1bdf22a5707928f
    • 7b01cf5 Updated PHPStan to commit 871b710698613fa58a3885d74f62c7ede9bd0bb9
    • 1917e06 Updated PHPStan to commit 92420cd4b190b57d1ba8bf9e800eb97c8c0ee2f2
    • 2eb1d78 Updated PHPStan to commit e46c6d34d360a1059b3b1f75efb690ae46c4d670
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump nette/utils from 3.2.5 to 3.2.6

    Bump nette/utils from 3.2.5 to 3.2.6

    Bumps nette/utils from 3.2.5 to 3.2.6.

    Release notes

    Sourced from nette/utils's releases.

    Released version 3.2.6

    • FileSystem: messages use normalized paths (#250)
    • Strings::indexOf() fixed empty $haystack and negative $nth #271
    • Strings: improved things around flags
    • Callback::unwrap can return non-callable #270
    • used @​return never
    • added Helpers::clamp()
    • Validators::isPhpIdentifier(): Value is always string. (#268)
    • Reflection::expandClassName() recognizes 'parent'
    • added Reflection::isClassKeyword(), Type::isClassKeyword()
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump phpstan/phpstan from 1.1.1 to 1.1.2

    Bump phpstan/phpstan from 1.1.1 to 1.1.2

    Bumps phpstan/phpstan from 1.1.1 to 1.1.2.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.1.2

    Bugfixes 🐛

    Function signature fixes 🤖

    • Mark file resource functions as having side effects (#698), thanks @​jlherren!
    • Use positive integers for various time functions (#760), thanks @​staabm!
    Commits
    • bcea0ae PHPStan 1.1.2
    • 57c3470 Updated PHPStan to commit 9488d34977f5e63728b4f182d17ccbfc426d1b4d
    • 10fceec Updated PHPStan to commit 822a9b4fc721ed87590e1258c7afadf4871014bc
    • ae8a96e Updated PHPStan to commit b92c18bc21adfe0014956f07f2f302b0a4e7454d
    • d62cb19 Updated PHPStan to commit 74787be3fe520a72febf3b779f12e9ad9e471c85
    • 49b29b5 Updated PHPStan to commit 9384783ffe29e1646bcbdce9ba3c06e9a400ebc8
    • c3210f7 Updated PHPStan to commit b5e44f7936d54accf7c5f5e5df9941b884f5b779
    • 3f520d5 Upgrade Parcel to v2
    • 13c1fe1 Updated PHPStan to commit 78b00d0664fca965d58ad3c3f069d1a4e51c0093
    • 86959ce Updated PHPStan to commit 12973cdb1c3c0f84e09dd039edfbf66a58991878
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • Bump infinityloop-dev/coding-standard from 0.1.1 to 0.2.1

    Bump infinityloop-dev/coding-standard from 0.1.1 to 0.2.1

    Bumps infinityloop-dev/coding-standard from 0.1.1 to 0.2.1.

    Release notes

    Sourced from infinityloop-dev/coding-standard's releases.

    0.2.1

    • Updated style for multiline union return type

    0.2

    • Added new sniffs for php 8
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Type - Dependencies 
    opened by dependabot[bot] 2
  • InputField validation function

    InputField validation function

    Add option to declare user-defined validation functions to inputFields.

    Directives can be used as a validation layer (see constraint-directives), but sometimes a simple and/or very specialized validation is required for a field and it does not make sense to create custom directive for such case.

    Type - Enhancement Ctg - New feature 
    opened by peldax 0
  • Arguments can not be omitted

    Arguments can not be omitted

    By specs, nullable arguments and input fields can be omitted from query, which is different from setting them to null.

    Graphpinator does not support this for arguments.

    • For input fields it is possible, because PHP 7.4+ can distinguish between set/unset property.
    • For arguments, this is not possible without unnecessary magic/loss of type safety.

    Graphpianator will always pass null as argument value for omitted arguments.

    Status - Wontfix Ctg - Spec incompatibility 
    opened by peldax 0
  • Reconsider module architetecture

    Reconsider module architetecture

    Graphpinator is be designed as a pipeline of different tasks, modules are meant be members of this pipeline.

    Request -> Parser -> Normalizer -> Finalizer -> Resolver
    

    Currently the system is a pipeline, but system members are hardcoded and modules only provide hooks.

    Request -> Parser -> Normalizer -> Finalizer -> Resolver -
            |         |             |            |           |
             -> hook   -> hook       -> hook      -> hook     -> hook
    

    It kinda works, but I would like to find a way for Modules to be first class citizens in this pipeline.

    Type - Enhancement Ctg - Internals 
    opened by peldax 0
  • Subscriptions support

    Subscriptions support

    Currently, subscriptions are treated the same way as queries.

    I need someone with concrete usacase and description of expected behaviour in order to properly implement it.

    Type - Enhancement Ctg - Spec incompatibility 
    opened by peldax 1
Releases(v1.3.1)
  • v1.3.1(Apr 14, 2022)

  • v1.3(Apr 6, 2022)

    New feature:

    • Type automatically inherits descriptions for fields and arguments from interfaces it implements
      • No need to repeat description for every implementing type anymore
    Source code(tar.gz)
    Source code(zip)
  • v1.2.6(Mar 4, 2022)

  • v1.2.5(Jan 22, 2022)

  • v1.2.4(Dec 8, 2021)

  • v1.2.3(Dec 4, 2021)

  • v1.2.2(Dec 4, 2021)

    New feature:

    • \Graphpinator\Typesystem\Attribute\Description attribute is now also used for Directives.

    Other:

    • Minor tweaks in descriptions for built-in types.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Dec 1, 2021)

    New feature:

    • Ability to declare description for Type/EnumItem using attribute \Graphpinator\Typesystem\Attribute\Description, instead of constant/doc-comment.
    • Implemented Countable for ListValue class.
    Source code(tar.gz)
    Source code(zip)
  • v1.2(Nov 30, 2021)

    New feature:

    • Ability to create EnumItemSet from native PHP enum. It must be string backed. For this enum type (where the EnumItemSet is created from native PHP enum) arguments and results are automatically converted from/to PHP enum object.

    Bugfix:

    • Added forgotten check to validate variable directive usage during normalization.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Nov 9, 2021)

    Bugfix / Ergonomics:

    • Avoid type error if unknown numeric arguments/inputfields are passed in variables, thrown exception now makes sense and provides all the information.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Nov 9, 2021)

    Ergonomics:

    • Added validation for DirectiveUsage arguments array, thrown exception now makes more sense to users not familiar with internals.
    Source code(tar.gz)
    Source code(zip)
  • v1.1(Sep 24, 2021)

    • Significant update to Normalizer. Selection sets with fragment spreads are not flattened and the structure is kept with fragments.
      • Selection sets are still validated as well as refined to remove duplicate fragments and fields.
      • This change allows specialized directive locations on fragment spread/inline fragment, as it is no longer tied to field location.
    • Relaxed type-condition validation for fragments. Previously it was too strict, which was incompatible with the specs and incorrectly threw an validation error in some edge scenarios.
    • Removed class aliases for backwards compatibility introduced in 1.0.
    Source code(tar.gz)
    Source code(zip)
  • v1.1-rc3(Sep 21, 2021)

    ⚠️ This is a pre-release, its is ready to be tested by wider range of users, but it is not recommended to use this version in production ⚠️

    • Third and probably final release candidate of upcoming 1.1 release.
    • Improved selection set validation & refinement process.
    • Removed class aliases for backwards compatibility introduced in 1.0.
    Source code(tar.gz)
    Source code(zip)
  • v1.1-rc2(Sep 18, 2021)

    ⚠️ This is a pre-release, its is ready to be tested by wider range of users, but it is not recommended to use this version in production ⚠️

    • Second release candidate of upcoming 1.1 release.
    • This version fixes some specification incompatibilities in value resolution, which were created by changes in previous RC.

    Other changes:

    • Relaxed type-condition validation for fragments. Previously it was too strict, which was incompatible with the specs and incorrectly threw an error in some edge scenarios.
    Source code(tar.gz)
    Source code(zip)
  • v1.1-rc1(Jul 25, 2021)

    ⚠️ This is a pre-release, use only for testing and validation of upcoming changes ⚠️

    • First release candidate of upcoming 1.1 release.
    • This version includes significant update to Normalizer. Selection sets with fragment spreads are not flattened and the structure is kept with fragments.
      • Selection sets are still validated as well as refined to remove duplicate fragments and fields.
      • This change allows specialized directive locations on fragment spread/inline fragment, as it is no longer tied to field location.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jun 26, 2021)

  • v1.0(Jun 24, 2021)

    After extremely long time in release candidates (30 RCs) and after many delays, here comes guaranteed stable version of GraPHPinator. I am aware that it took very long to get out of RC phase, but I always found something worth improving and wanted to be sure that 1.X will stay mainline for a long time.

    There are still some improvements planned, but none should break compatibility with existing systems & modules.

    Changes to RC 30:

    • Fixed some rare & wierd bug with internal array pointer in Finalizer
    • Fixed interface contract in operation location directives (return type changed to void)
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc30(Jun 22, 2021)

  • v1.0-rc29-2(Jun 15, 2021)

  • v1.0-rc29(Jun 15, 2021)

    • Correctly implemented Input value coercion rules
      • Input field can be omitted in request and its value is then also omitted in value object (previously null was automatically added).
      • This rule should probably apply to argument set (specs are not clear in this case), but this behavior is intentionally NOT implemented.
      • If you wish to keep previous behavior, set default value null to all nullable fields.
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc28(Jun 7, 2021)

    • Changes in the typesystem namespace structure
      • Moved all typesystem elements into Typesystem namespace
      • Merged Type\Defnition and Typesystem\Type into Typesystem\Constraint\Type
      • :warning: This is a huge BC break (I promise its the last one), its the last thing to wanted to clear out before a stable release. I included aliases to avoid as many BC breaks as possible, but everyone is encouraged to refactor the namespaces to new and stable version (also, from my observations, class aliases behave unexpectedly in some situations).
      • Removed \Graphpinator\Directive\FieldDirectiveResult, the constants are now located in \Graphpinator\Typesystem\Location\FieldLocation.
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc27(Jun 5, 2021)

  • v1.0-rc26(Jun 2, 2021)

    • Implemented List input coercion
      • Overlooked section in the specs, specifying that single value is automatically converted to list of size 1
    • Because of upgrade in Parser (version 1.1), keywords are now allowed to be valid names
      • Pre 1.1 Parser resolved null/true/false/query/mutation/subscription/on as keywords and not as a valid names for fields and other entities
      • Whether is it valid or not is discussed in the GraphQL specification issue
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc25(Jun 1, 2021)

    • Fixed specifiedBy directive not available in introspection
    • Fixed initialization of property in Schema
    • Decoupled Introspection from Schema
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc24(May 31, 2021)

  • v1.0-rc23-2(May 29, 2021)

  • v1.0-rc23(May 29, 2021)

    • Added support for directives on Union, Fragment definition
      • Currently without any middleware hooks
    • Added support for directives on Variable definition
      • Allows hooking some logic on variable value
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc22(May 26, 2021)

    • Added support for directives on Scalar, Enum and Schema
      • Currently without any middleware hooks
    • Added specifiedBy built-in directive
    • Added deprecation support for arguments/input-fields
    • Added checks to detect non-repeatable typesystem directive duplicates
    • Typesystem directive validations are now disabled when $validateSchema is set to false
    • Re-enabled codestyle checks with PHP 8 support
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc21(May 16, 2021)

    • Additional schema validations
      • detect emtpy types/interfaces/inputs
      • detect interface cycles
      • detect identical root operation types
    • Test improvements
    Source code(tar.gz)
    Source code(zip)
  • v1.0-rc20(Apr 30, 2021)

Owner
Infinityloop.dev
Software startup company from Pilsen (Czech Republic).
Infinityloop.dev
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Leonardo Losoviz 265 Jan 7, 2023
Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server.

Field Query Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server. Install Via Composer com

PoP 4 Jan 7, 2022
A PHP implementation of the GraphQL specification based on the JavaScript reference implementation

GraphQL This is a PHP implementation of the GraphQL specification based on the JavaScript reference implementation. Related projects DateTime scalar R

Digia 219 Nov 16, 2022
Pure PHP implementation of GraphQL Server – Symfony Bundle

Symfony GraphQl Bundle This is a bundle based on the pure PHP GraphQL Server implementation This bundle provides you with: Full compatibility with the

null 283 Dec 15, 2022
A PHP port of GraphQL reference implementation

graphql-php This is a PHP implementation of the GraphQL specification based on the reference implementation in JavaScript. Installation Via composer:

Webonyx 4.4k Jan 7, 2023
GraphQL implementation with power of Laravel

Laravel GraphQL Use Facebook GraphQL with Laravel 5.2 >=. It is based on the PHP implementation here. You can find more information about GraphQL in t

Studionet 56 Mar 9, 2022
Test your PHP GraphQL server in style, with Pest!

Pest GraphQL Plugin Test your GraphQL API in style, with Pest! Installation Simply install through Composer! composer require --dev miniaturebase/pest

Minibase 14 Aug 9, 2022
This bundle provides tools to build a complete GraphQL server in your Symfony App.

OverblogGraphQLBundle This Symfony bundle provides integration of GraphQL using webonyx/graphql-php and GraphQL Relay. It also supports: batching with

Webedia - Overblog 720 Dec 25, 2022
EXPERIMENTAL plugin extending WPGraphQL to support querying (Gutenberg) Blocks as data, using Server Side Block registries to map Blocks to the GraphQL Schema.

WPGraphQL Block Editor This is an experimental plugin to work toward compatiblity between the WordPress Gutenberg Block Editor and WPGraphQL, based on

WPGraphQL 29 Nov 18, 2022
The server component of API Platform: hypermedia and GraphQL APIs in minutes

API Platform Core API Platform Core is an easy to use and powerful system to create hypermedia-driven REST and GraphQL APIs. It is a component of the

API Platform 2.2k Dec 27, 2022
Pure PHP realization of GraphQL protocol

Looking for Maintainers! Unfortunatelly, we cannot longer support this package and are looking for someone to take the ownership. Currently Only PRs w

null 714 Dec 21, 2022
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.

API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility and flexibility: Desig

API Platform 7.7k Jan 7, 2023
GraphQL Bundle for Symfony 2.

Symfony 2 GraphQl Bundle Use Facebook GraphQL with Symfony 2. This library port laravel-graphql. It is based on the PHP implementation here. Installat

Sergey Varibrus 35 Nov 17, 2022
Laravel wrapper for Facebook's GraphQL

Laravel GraphQL Use Facebook's GraphQL with Laravel 6.0+. It is based on the PHP port of GraphQL reference implementation. You can find more informati

Mikk Mihkel Nurges 1.9k Dec 31, 2022
A framework for serving GraphQL from Laravel

Lighthouse A framework for serving GraphQL from Laravel Lighthouse is a GraphQL framework that integrates with your Laravel application. It takes the

NuWave Commerce 3.1k Jan 6, 2023
🍞🧑‍🍳 An on-the-fly GraphQL Schema generator from Eloquent models for Laravel.

An on-the-fly GraphQL Schema generator from Eloquent models for Laravel. Installation Quickstart Model schemas Installation This package requires PHP

Scrn 100 Oct 16, 2022
Add Price Including tax for Magento's "cart" GraphQl query

Comwrap_GraphQlCartPrices Add Price Including tax for Magento's "cart" GraphQl query Query will looks like following: items { id __typenam

Comwrap 1 Dec 2, 2021
A Statamic Pro addon that provides alternative GraphQL queries for collections, entries and global sets.

Statamic Enhanced GraphQL A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets. ⚠️ This is

Grischa Erbe 2 Dec 7, 2021
Place where I record all knowledge gained for GraphQL from Laracasts & other tutorials.

Knowledge from Laracasts series: https://laracasts.com/series/graphql-with-laravel-and-vue What is GraphQL It is a query language for your API, and it

Nikola 0 Dec 26, 2021