A PHP port of GraphQL reference implementation

Overview

graphql-php

CI Coverage Status Latest Stable Version

This is a PHP implementation of the GraphQL specification based on the reference implementation in JavaScript.

Installation

Via composer:

composer require webonyx/graphql-php

Documentation

Full documentation is available at https://webonyx.github.io/graphql-php or in the docs directory.

If you don't know what GraphQL is, visit the official website first.

Examples

There are several ready examples in the examples directory, with a specific README file per example.

Versioning

This project follows Semantic Versioning 2.0.0.

Elements that belong to the public API of this package are marked with the @api PHPDoc tag. Those elements are thus guaranteed to be stable within major versions. All other elements are not part of this backwards compatibility guarantee and may change between minor or patch versions.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

See LICENSE.

Comments
  • Lazy loading of types

    Lazy loading of types

    Implements #425 Proof of concept of full support for lazy loading of types.

    In a nutshell, you can substitute a callable any place that you would ordinarily supply a Type, and it won't be executed by the library until it is actually needed.

    For example, you can create a Types class that looks like this:

    class Types {
    	public static function get(string $classname)
    	{
    		return function() use ($classname) {
    			return static::fromCache($classname);
    		};
    	}
    
    	protected static function fromCache(string $classname) {
    		$parts = explode("\\", $classname);
    		$cacheName = strtolower(preg_replace('~Type$~', '', $parts[count($parts) - 1]));
    		$type = null;
    
    		if (!isset(self::$types[$cacheName])) {
    			if (class_exists($classname)) {
    				$type = new $classname();
    			}
    
    			self::$types[$cacheName] = $type;
    		}
    
    		$type = self::$types[$cacheName];
    
    		if (!$type) {
    			throw new Exception("Unknown graphql type: " . $classname);
    		}
    		return $type;
    	}
    
        public static function currency() { return static::get(CurrencyType::class);}
        // ... I explicitly stub out these type methods for the benefit of intellisense and [stanning](https://github.com/phpstan/phpstan), but they're not necessary
    }
        
    

    And then your field/arg definitions look the same as usual:

    ...
    	'currency' => [
    		'type' => Types::currency(), // this won't load until it is specifically needed!
    		'description' => 'A currency record',
    

    It may be difficult to imagine this being of any appreciable benefit for small or toy programs, but in my real project I dynamically generate my mutation types (using this) and doing even a small mutation triggers a flood of activity and the instantiation of 656 types(!).

    With this change, that number drops to 1.

    I have run this in the profiler: without lazy loading with lazy loading

    For me, this equates to a savings of around a quarter of a second and 3MB of memory.

    So, what do you think? It's only around 50 lines of mostly trivial code. If you think it looks promising I'll start in on tests and documentation and further polishing.

    opened by shmax 49
  • Implement PSR-7 RequestInterface support

    Implement PSR-7 RequestInterface support

    ServerRequestInterface is not needed, parent RequestInterface is sufficient
    Replaced custom PSR-7 test stubs with nyholm/psr-7 implementation
    Fixed reading body contents

    • ServerRequestInterface extends RequestInterface so for this case I think it's not a BC break.
    • Rephrasing exception message might be considered a BC break I guess.
    opened by simPod 33
  • Executor performance optimization

    Executor performance optimization

    Hi. First, thank you for the great library! We use it to power our API at Scuk.cz and it's been a smooth ride.

    Recently, however, we've discovered poor performance for some of the queries the frontend service sends to the GraphQL endpoint. Over time our schema got pretty big (currently it consists of ~300 types /half of which are object types/ and ~1000 resolvable fields on object types). So did the queries (one of the pages in our app queries ~200 fields).

    We successfully refactored GraphQL schema so that types & fields are created lazily. Also we started caching parsed AST. This got us nice speed improvements. After these I've started to look at performance of the Executor. It costs us more than 150ms per request for some queries. This is the call graph of GraphQL endpoint for such query (library calls are highlighted):

    GraphQL call graph

    I've started digging in the code and found some easy to improve functions (e.g. Executor::shouldIncludeNode()). But I estimate these would shave off only couple of milliseconds. So I've started to work on a new executor:

    • separated compilation &Β execution phases
      • first, AST is transformed into an intermediate representation (= instructions) that is better suitable for manipulation and exection
      • then, the instructions are processed sequentially (I suppose sequential execution should be more machine-friendly than jumping between tens of functions and callbacks, therefore perform better)
    • instruction pipeline can be manipulated with during the execution (new instructions are pushed to the front or back)
    • compiled instructions could be cached instead of an AST
      • in the future, they could be compiled down to PHP code for even better performance (as some templating engines, DI containers etc. do)

    This is still a work in progress and will need some time before the new executor passes the test suite. Yet, what do you think about this? :)


    Questions & notes:

    1. ValueNode interface doc comment says that VariableNode is a ValueNode. But VariableNode does not implement it. Is it intentional, or a bug?
    2. This might be quite a lot of changes. Is there a way to check code style? (I've run composer run lint, however, PHP-CS reported issues even with current files.)
    3. Current executor works with results as arrays. But this is a problem for JSON serialization if the array remains empty (there is a workaround converting empty array to stdClass). I started new executor to work with stdClasses instead, because I need pass by reference semantics, also it fixes JSON-serialization-related issue from the start. But this would be big breaking change. Should I continue with stdClasses, or use arrays?
    4. I started typehinting all parameters of all new methods. But then I realized the library still supports older PHP versions. Is there a plan to drop old versions support?
    5. ResolveInfo is tightly coupled to AST traversal execution model. After the compilation, AST is no longer relevant for new executor. It could include needed AST nodes in instructions, however, it defies the point of the compilation step.
    opened by jakubkulhan 33
  • Add support for setting extensions from resolvers.

    Add support for setting extensions from resolvers.

    This adds an API to ResolveInfo which allows resolvers to directly add items to be returned to the client in the extensions element of the response body.

    see http://facebook.github.io/graphql/October2016/#sec-Response-Format

    opened by aelnagger 32
  • Fix namenode type / rewrite Printer

    Fix namenode type / rewrite Printer

    An alternative fix for #655, the infamous NamedTypeNode NameNode / string debacle.

    Took me a while to understand, but all the trouble was being caused by the unusual algorithm used to print ASTs. It tied into Visitor::visit, and starting at the leaf nodes, would stomp over properties with strings so that it could concatenate everything into a big string. We noticed this happening on the NamedTypeNode in particular, but actually this was happening with all of the nodes.

    Once I understood what was happening, I was able to rearrange the algorithm into a more conventional top-down recursive one that does not "edit" any nodes, nor do any illegal writes. While I was at it, I corrected a number of type annotations. PHPStan is now happy. Note that this change is not as dramatic as it might look; all of the callbacks from the old leave section in Printer were simply ported into a big switch statement. I didn't change any of the core logic.

    Interestingly, performance seems to improve with these changes, though I'm not sure why.

    master: https://blackfire.io/profiles/a1b07e4f-cba2-4327-84c5-c42e7559d8b2/graph

    this branch: https://blackfire.io/profiles/755fec5e-3bf3-491a-b8d0-8a6d78a30fd6/graph

    enhancement 
    opened by shmax 30
  • Horizontal eval for lazy loading same-type objects

    Horizontal eval for lazy loading same-type objects

    When I first learned about GraphQL there was a performance chapter. If every relation loads every single relation, it requires many queries to load a few levels of data, even if the actual data is only on the last level. The solution was to lazy load objects: first collect ids (horizontal), and then load all objects at once, and then evaluate the next level.

    Just in case. This query:

    query {
        user {
            reservations {
                resource {
                    sport {
                        name
                    }
                }
            }
        }
    }
    

    would take 20 queries to find 10 reservations > 10x 1 resource > 10x 1 sport. If it would eval horizontally, it would do 2 queries: load 10 resources, then load 10 sports. (Maybe not 2 levels, but even 1 could be a big difference.)

    Is that a thing? It seems like the query is evaled vertically first, so it loads the entire 1 reservation (1 resource + 1 sport), and then the entire 1 next (1 resource + 1 sport) etc.

    question 
    opened by rudiedirkx 26
  • Update graphql spec to April2016

    Update graphql spec to April2016

    There is a new version of the GraphQL spec April2016.

    It changed some parts in the introspection. I might have time to open a PR for this, but probably at earliest in two weeks.

    opened by danez 25
  • Add AmpPromiseAdapter

    Add AmpPromiseAdapter

    Had some time today so I implemented a PromiseAdapter for Amp. Note that I just wrote blindly what seemed to make some sense and it's not tested at all. I'll try to use it in my project when I get to reimplementing my GraphQL part to async. And of course I need to add some unit tests. All of this might take a while (a few months), I'm just posting this here in case someone was looking for it and was willing to help me out with testing.

    Code reviews are of course welcome.

    opened by enumag 23
  • Feedback on Experimental Executor

    Feedback on Experimental Executor

    Please post your feedback here on the new experimental executor introduced in https://github.com/webonyx/graphql-php/pull/314

    Especially interested in following questions:

    1. Do you see a performance improvement on your queries? How much on average?
    2. Do you experience any issues / unexpected behavior with it?
    community feedback wanted 
    opened by vladar 21
  • Mutations with Relay (React)

    Mutations with Relay (React)

    I'm using the laravel-graphql, and created an issue but I'm not sure if it's something that should actually be created here (still trying to wrap my head around GraphQL).

    When working with Relay, it expects that mutations have only one argument called input. Looking at the todo example, in the schema.json file it has that field listed as an INPUT_OBJECT type. I created the following (again, using laravel-graphql), but I'm unable to get the fields from the InputObjectType. Am I doing something wrong?

    namespace App\GraphQL\Mutations;
    
    use GraphQL;
    use App\Models\Customer;
    use GraphQL\Type\Definition\Type;
    use GraphQL\Type\Definition\InputObjectType;
    use Folklore\GraphQL\Support\Mutation;
    
    class UpdateCustomerEmail extends Mutation
    {
        /**
         * Associated GraphQL Type.
         *
         * @return mixed
         */
        public function type()
        {
            return GraphQL::type('customerPayload');
        }
    
        /**
         * Available arguments for mutation.
         *
         * @return array
         */
        public function args()
        {
            return [
                'input' => [
                    'name' => 'input',
                    'type' => new InputObjectType([
                        'name' => 'updateCustomerEmailInput',
                        'fields' => [
                            'entity_id' => [
                                'name' => 'entity_id',
                                'type' => Type::nonNull(Type::string())
                            ],
                            'email' => [
                                'name' => 'email',
                                'type' => Type::nonNull(Type::string())
                            ]
                        ]
                    ])
                ]
            ];
        }
    
        /**
         * Resolve mutation.
         *
         * @param  string $root
         * @param  array $args
         * @return Customer
         */
        public function resolve($root, $args, $info)
        {
            // $root is null, $args is an empty array and nothing in $info gives me the 
            // variables passed in the request
            $customer = Customer::find($args['input']['entity_id']); // $args['input'] is not set
            $customer->email = $args['input']['email'];
            return $customer;
        }
    }
    
    opened by chrissm79 21
  • Performance improvements

    Performance improvements

    I've been messing around with this project a bit lately, and I've had some trouble with performance. The GraphQL executor does quite a bit of unnecessary work when it resolves fields. Since it operates recursively, larger lists have a really bad impact on performance. I have tried to fix some of the bottlenecks by memoizing objects and values that can be re-used.

    I'd like to hear what you think about this approach. According to the Blackfire profiler the response was 2x faster for a large query and 1.5x faster for one I use in my app. You can check out my fork here: https://github.com/johanobergman/graphql-php

    opened by johanobergman 21
  • Update dependency amphp/amp to v3

    Update dependency amphp/amp to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | amphp/amp (source) | require-dev | major | ^2.6 -> ^3.0 |


    Release Notes

    amphp/amp

    v3.0.0: 3.0.0

    Compare Source

    Event Loop

    Amp no longer ships its own event loop. It's now based on Revolt. Revolt\EventLoop is quite similar to Amp's previous Amp\Loop. A very important difference is using float $seconds instead of int $milliseconds for timers though!

    Promises

    Future is a replacement for the previous Promise. There's no need for callbacks or yield anymore! Its await() method is based on fibers and replaces generator based coroutines / Amp\Promise\wait().

    • Renamed Amp\Deferred to Amp\DeferredFuture.
    • Removed Amp\Promise\wait(): Use Amp\Future::await() instead, which can be called in any (nested) context unlike before.
    • Removed Amp\call(): Remove the passed closure boilerplate and all yield keywords, interruption is handled via fibers now instead of generator coroutines.
    • Removed Amp\asyncCall(): Replace invocations with Amp\async(), which starts a new fiber instead of using generators.
    • Removed Amp\coroutine(): There's no direct replacement.
    • Removed Amp\asyncCoroutine(): There's no direct replacement.
    • Removed Amp\Promise\timeout(): Future::await() accepts an optional Cancellation, which can be used as a replacement.
    • Removed Amp\Promise\rethrow(): Unhandled errors are now automatically thrown into the event loop, so there's no need for that function anymore.
    • Unhandled errors can be ignored using Future::ignore() if needed, but should usually be handled in some way.
    • Removed Amp\Promise\wrap(): Use Future::finally() instead.
    • Renamed Amp\getCurrentTime() to Amp\now() returning the time in seconds instead of milliseconds.
    • Changed Amp\delay() to accept the delay in seconds now instead of milliseconds.
    • Added Amp\weakClosure() to allow a class to hold a self-referencing Closure without creating a circular reference that prevents automatic garbage collection.
    • Added Amp\trapSignal() to await one or multiple signals.
    Promise Combinators

    Promise combinators have been renamed:

    • Amp\Promise\race() has been renamed to Amp\Future\awaitFirst()
    • Amp\Promise\first() has been renamed to Amp\Future\awaitAny()
    • Amp\Promise\some() has been renamed to Amp\Future\awaitAnyN()
    • Amp\Promise\any() has been renamed to Amp\Future\awaitAll()
    • Amp\Promise\all() has been renamed to Amp\Future\await()
    CancellationToken
    • CancellationToken has been renamed to Cancellation.
    • CancellationTokenSource has been renamed to DeferredCancellation.
    • NullCancellationToken has been renamed to NullCancellation.
    • TimeoutCancellationToken has been renamed to TimeoutCancellation.
    • CombinedCancellationToken has been renamed to CompositeCancellation.
    • SignalCancellation has been added.
    Iterators

    Iterators have been removed from amphp/amp as normal PHP iterators can be used with fibers now and there's no need for a separate API. However, there's still some need for concurrent iterators, which is covered by the new amphp/pipeline library now.

    Closable

    Amp\Closable has been added as a new basic interface for closable resources such as streams or sockets.

    Strict Types

    Strict types now declared in all library files. This will affect callbacks invoked within this library's code which use scalar types as parameters. Functions used with Amp\async() are the most likely to be affected by this change β€” these functions will now be invoked within a strict-types context.


    Configuration

    πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Rate-Limit: Possibility to retrieve the QueryComplexity

    Rate-Limit: Possibility to retrieve the QueryComplexity

    Hello together,

    there are requirements to build a rate-limit system based on the query complexity & not based on request-hits. This blog-post describes this behaivor: https://shopify.engineering/rate-limiting-graphql-apis-calculating-query-complexity To make this happen we need to calculate the QueryComplexity before we execute the query.

    This can be done by executing the QueryComplexity rule before the "executeQuery" method. In the past there was also a getter to retrieve the calculated QueryComplexity on the validator.

    Bonus: The used query complexity after the execution can be lower then the requested QueryComplexity. For example you request a list of 10 but the system have only 5. In a perfect world we would charge back the 5 to much requested nodes. While such a sub-feature would be nice, it is for sure no requirement for a first change.

    Introducing of QueryComplexity getter: https://github.com/webonyx/graphql-php/pull/531 Issue got created based on following discussion: https://github.com/webonyx/graphql-php/discussions/1025

    Thanks!

    help wanted 
    opened by kinimodmeyer 6
  • Comply with graphql-over-http specification

    Comply with graphql-over-http specification

    It would be great if the standard server were compliant with the GraphQL-over-HTTP specification.

    The test suite could be done in a way that is reusable by other servers: https://github.com/graphql/graphql-over-http/issues/57

    enhancement 
    opened by spawnia 0
  • Ignore Introspection queries in QueryComplexity rule

    Ignore Introspection queries in QueryComplexity rule

    Followup from https://github.com/webonyx/graphql-php/discussions/1203

    The QueryComplexity rule should ignore introspection query. This way you can set the max query complexity very low and still allow introspections to happen.

    Introspection has a complexity of around 181.

    enhancement 
    opened by ruudk 1
  • Do not store standard types statically but keep them on the Schema instead

    Do not store standard types statically but keep them on the Schema instead

    When working with 2 schemas that have different standard types this becomes problematic.

    For example, I have a schema that uses a custom ID type, but the other wants to use the default.

    I can imagine this is not easily possible currently because of the way types are resolvable without a Schema (#1149).

    enhancement BC break 
    opened by ruudk 1
  • Version docs

    Version docs

    We currently have only one version of docs deployed, always reflecting the latest changes in master. This is inaccurate for users of older versions: https://github.com/webonyx/graphql-php/issues/1178 https://github.com/webonyx/graphql-php/issues/944

    We can try to set up https://github.com/jimporter/mike for versioning.

    docs 
    opened by spawnia 0
Releases(v15.0.0)
  • v15.0.0(Jan 6, 2023)

    Changed

    • PHP version required: 7.4+
    • Propagate error message and stack trace for why leaf value serialization failed
    • Do not throw client safe Error when failing to serialize an Enum type
    • Use native PHP types for properties of Type and its subclasses
    • Throw SerializationError over client safe Error when failing to serialize leaf types
    • Move debug entries in errors under extensions key
    • Use native PHP types wherever possible
    • Always throw RequestError with useful message when clients provide an invalid JSON body
    • Move class BlockString from namespace GraphQL\Utils to GraphQL\Language
    • Return string-keyed arrays from GraphQL::getStandardDirectives(), GraphQL::getStandardTypes() and GraphQL::getStandardValidationRules()
    • Move complexity related code from FieldDefinition to QueryComplexity
    • Exclude unused standard types from the schema
    • Require lazy type loader to return Type directly without an intermediary callable
    • Allow lazy type loader to return null
    • Rename ServerConfig option persistentQueryLoader to persistedQueryLoader
    • Call previously unused methods EnumType::parseValue() and EnumType::parseLiteral()
    • Strongly type PromiseAdapter::createRejected() to require \Throwable
    • Move members specific to NamedType out of Type: $name, $description, $config, isBuiltInType(), assertValid()
    • Always convert recursively when calling Node::toArray()
    • Make Directive::$config['args'] use the same definition style as FieldDefinition::$config['args']
    • Rename FieldArgument to Argument
    • Make errors when parsing scalar literals more precise
    • Change expected QueryPlan options from ['group-implementor-fields'] to ['groupImplementorFields' => true] in ResolveInfo::lookAhead()
    • Always convert promises through PromiseAdapter::convertThenable() before calling ->then() on them
    • Use JSON_THROW_ON_ERROR in json_encode()
    • Validate some internal invariants through assert()
    • PromiseAdapter::all() accepts iterable
    • Throw if Introspection::fromSchema() returns no data
    • Reorganize abstract class ASTValidationContext to interface ValidationContext
    • Reorganize AST interfaces related to schema and type extensions
    • Align Utils::suggestionList() with the reference implementation (#1075)
    • Order schema topologically and according to the user-defined order, affects introspection and printing
    • GraphQL\Utils\AST::typeFromAST() now needs a type loader callable instead of the Schema
    • Do not change HTTP status code in StandardServer
    • Use " instead of """ for single line descriptions
    • Make Helper::emitResponse() private, use Helper::sendResponse()
    • Emit unescaped UTF-8 from StandardServer
    • Sync input value coercion with graphql-js reference implementation
    • Store rules exclusively by class name in DocumentValidator
    • Reorder standard types as described in the GraphQL specification
    • Improve runtime performance by moving checks for duplicate/mismatching type instances to assert() or schema validation
    • Replace HasSelectionSet::$selectionSet with HasSelectionSet::getSelectionSet()
    • Replace TypeDefinitionNode::$name with TypeDefinitionNode::getName()
    • Replace TypeExtensionNode::$name with TypeExtensionNode::getName()

    Added

    • Improve extendability of validator rules
    • Add tests for errors that occur when undeclared fields are passed in input
    • Warn about orphaned object types
    • Expose structured enumeration of directive locations
    • Add AST::concatAST() utility
    • Allow lazy input object fields
    • Add validation rule UniqueEnumValueNames
    • Add SDL validation rule UniqueOperationTypes (#995)
    • Add ability to remove custom validation rules after adding them via DocumentValidator::removeRule()
    • Allow lazy enum values
    • Make Node implement JsonSerializable
    • Add SDL validation rule UniqueTypeNames (#998)
    • Add support for SDL validation to KnownTypeNames rule (#999)
    • Add SDL validation rule UniqueArgumentDefinitionNames (#1136)
    • Add parseValue config option to InputObjectType to parse input value to custom value object
    • Add option sortTypes to have SchemaPrinter order types alphabetically
    • Allow constructing EnumType from PHP enum
    • Add TypeInfo::getParentTypeStack() and TypeInfo::getFieldDefStack()
    • Include path to faulty input in coercion errors
    • Add ability to resolve abstract type of object via __typename

    Optimized

    • Use recursive algorithm for printer and improve its performance
    • Use foreach over slower functions array_map() and Utils::map()

    Fixed

    • Avoid QueryPlan crash when multiple $fieldNodes are present
    • Allow instantiating multiple QueryPlan with different options
    • Clarify error when attempting to coerce anything but array or stdClass to an input object
    • Allow directives on variable definitions
    • Handle null parent of list in ValuesOfCorrectType::getVisitor
    • Allow sending both query and queryId, ignore queryId in that case
    • Preserve extended methods from class-based types in SchemaExtender::extend()
    • Fix printing of empty types (#940)
    • Clone NodeList in Node::cloneDeep()
    • Calling Schema::getType() on a schema built from SDL returns null for unknown types (#1068)
    • Avoid crash on typeless inline fragment when using QueryComplexity rule
    • Avoid calling FormattedError::addDebugEntries() twice when using default error formatting
    • Avoid calling defined functions named like lazily loaded types
    • Show actual error in debug entries
    • Deal with iterable in implementations of PromiseAdapter::all()

    Removed

    • Remove OperationParams method getOriginalInput() in favor of public property $originalInput
    • Remove OperationParams method isReadOnly() in favor of public property $readOnly
    • Remove Utils::withErrorHandling()
    • Remove TypeComparators::doTypesOverlap()
    • Remove DocumentValidator::isError()
    • Remove DocumentValidator::append()
    • Remove Utils::getVariableType() in favor of Utils::printSafe()
    • Remove warning for passing isDeprecated in field definition config
    • Remove WrappingType::getWrappedType() argument $recurse in favor of WrappingType::getInnermostType()
    • Remove Type::assertType()
    • Remove ListOfType::$ofType, ListOfType::getOfType() and NonNull::getOfType()
    • Remove option commentDescriptions from BuildSchema::buildAST(), BuildSchema::build() and Printer::doPrint()
    • Remove parameter $options from ASTDefinitionBuilder
    • Remove FieldDefinition::create() in favor of new FieldDefinition()
    • Remove GraphQL\Exception\InvalidArgument
    • Remove Utils::find(), Utils::every() and Utils::invariant()
    • Remove argument bool $exitWhenDone from StandardServer::send500Error() and StandardServer::handleRequest()
    • Remove Schema::getAstNode() in favor of Schema::$astNode
    • Remove ability to override standard types through Schema option types, use Type::overrideStandardTypes()
    • Remove GraphQL\Utils\TypeInfo::typeFromAST(), use GraphQL\Utils\AST::typeFromAST()
    • Remove StandardServer::send500Error(), handle non-GraphQL errors yourself
    • Remove StandardServer::getHelper(), use new Helper
    • Remove error extension field category, use custom error formatting if you still need it
    • Remove deprecated Type::getInternalTypes()
    • Remove deprecated GraphQL::execute()
    • Remove deprecated GraphQL::executeAndReturnResult()
    • Remove deprecated experimental CoroutineExecutor
    • Remove deprecated FormattedError::create() and FormattedError::createFromPHPError()
    • Remove deprecated GraphQL::setPromiseAdapter()
    • Remove deprecated AST::getOperation()
    • Remove deprecated constants from BreakingChangesFinder
    • Remove deprecated DocumentValidator::isValidLiteralValue()
    • Remove deprecated Error::formatError() and Error::toSerializableArray()
    • Remove deprecated GraphQL::getInternalDirectives()
    • Remove deprecated Schema::isPossibleType()
    • Remove deprecated methods from TypeInfo
    • Remove deprecated Values::valueFromAST() and Values::isValidPHPValue()
    • Remove deprecated public property access to InputObjectField::$type
    • Remove deprecated public property access to FieldDefinition::$type
    • Remove alias GraphQL\Validator\Rules\AbstractQuerySecurity, use GraphQL\Validator\Rules\QuerySecurityRule
    • Remove alias GraphQL\Validator\Rules\AbstractValidationRule, use GraphQL\Validator\Rules\ValidationRule
    • Remove alias GraphQL\Utils\FindBreakingChanges, use GraphQL\Utils\BreakingChangesFinder
    Source code(tar.gz)
    Source code(zip)
  • v14.11.9(Jan 6, 2023)

  • v15.0.0-beta.1(Nov 10, 2022)

    Changed

    • PHP version required: 7.4+
    • Propagate error message and stack trace for why leaf value serialization failed
    • Do not throw client safe Error when failing to serialize an Enum type
    • Use native PHP types for properties of Type and its subclasses
    • Throw SerializationError over client safe Error when failing to serialize leaf types
    • Move debug entries in errors under extensions key
    • Use native PHP types wherever possible
    • Always throw RequestError with useful message when clients provide an invalid JSON body
    • Move class BlockString from namespace GraphQL\Utils to GraphQL\Language
    • Return string-keyed arrays from GraphQL::getStandardDirectives(), GraphQL::getStandardTypes() and GraphQL::getStandardValidationRules()
    • Move complexity related code from FieldDefinition to QueryComplexity
    • Exclude unused standard types from the schema
    • Require lazy type loader to return Type directly without an intermediary callable
    • Allow lazy type loader to return null
    • Rename ServerConfig option persistentQueryLoader to persistedQueryLoader
    • Call previously unused methods EnumType::parseValue() and EnumType::parseLiteral()
    • Strongly type PromiseAdapter::createRejected() to require \Throwable
    • Move members specific to NamedType out of Type: $name, $description, $config, isBuiltInType(), assertValid()
    • Always convert recursively when calling Node::toArray()
    • Make Directive::$config['args'] use the same definition style as FieldDefinition::$config['args']
    • Rename FieldArgument to Argument
    • Make errors when parsing scalar literals more precise
    • Change expected QueryPlan options from ['group-implementor-fields'] to ['groupImplementorFields' => true] in ResolveInfo::lookAhead()
    • Always convert promises through PromiseAdapter::convertThenable() before calling ->then() on them
    • Use JSON_THROW_ON_ERROR in json_encode()
    • Validate some internal invariants through assert()
    • PromiseAdapter::all() accepts iterable
    • Throw if Introspection::fromSchema() returns no data
    • Reorganize abstract class ASTValidationContext to interface ValidationContext
    • Reorganize AST interfaces related to schema and type extensions
    • Align Utils::suggestionList() with the reference implementation (#1075)
    • Order schema topologically and according to the user-defined order, affects introspection and printing
    • GraphQL\Utils\AST::typeFromAST() now needs a type loader callable instead of the Schema
    • Do not change HTTP status code in StandardServer
    • Use " instead of """ for single line descriptions
    • Make Helper::emitResponse() private, use Helper::sendResponse()
    • Emit unescaped UTF-8 from StandardServer
    • Sync input value coercion with graphql-js reference implementation
    • Store rules exclusively by class name in DocumentValidator
    • Reorder standard types as described in the GraphQL specification
    • Improve runtime performance by moving checks for duplicate/mismatching type instances to assert() or schema validation

    Added

    • Improve extendability of validator rules
    • Add tests for errors that occur when undeclared fields are passed in input
    • Warn about orphaned object types
    • Expose structured enumeration of directive locations
    • Add AST::concatAST() utility
    • Allow lazy input object fields
    • Add validation rule UniqueEnumValueNames
    • Add SDL validation rule UniqueOperationTypes (#995)
    • Add ability to remove custom validation rules after adding them via DocumentValidator::removeRule()
    • Allow lazy enum values
    • Make Node implement JsonSerializable
    • Add SDL validation rule UniqueTypeNames (#998)
    • Add support for SDL validation to KnownTypeNames rule (#999)
    • Add SDL validation rule UniqueArgumentDefinitionNames (#1136)
    • Add parseValue config option to InputObjectType to parse input value to custom value object
    • Add option sortTypes to have SchemaPrinter order types alphabetically
    • Allow constructing EnumType from PHP enum
    • Add TypeInfo::getParentTypeStack() and TypeInfo::getFieldDefStack()
    • Include path to faulty input in coercion errors
    • Add ability to resolve abstract type of object via __typename

    Optimized

    • Use recursive algorithm for printer and improve its performance
    • Use foreach over slower functions array_map() and Utils::map()

    Fixed

    • Avoid QueryPlan crash when multiple $fieldNodes are present
    • Allow instantiating multiple QueryPlan with different options
    • Clarify error when attempting to coerce anything but array or stdClass to an input object
    • Allow directives on variable definitions
    • Handle null parent of list in ValuesOfCorrectType::getVisitor
    • Allow sending both query and queryId, ignore queryId in that case
    • Preserve extended methods from class-based types in SchemaExtender::extend()
    • Fix printing of empty types (#940)
    • Clone NodeList in Node::cloneDeep()
    • Calling Schema::getType() on a schema built from SDL returns null for unknown types (#1068)
    • Avoid crash on typeless inline fragment when using QueryComplexity rule
    • Avoid calling FormattedError::addDebugEntries() twice when using default error formatting
    • Avoid calling defined functions named like lazily loaded types
    • Show actual error in debug entries

    Removed

    • Remove OperationParams method getOriginalInput() in favor of public property $originalInput
    • Remove OperationParams method isReadOnly() in favor of public property $readOnly
    • Remove Utils::withErrorHandling()
    • Remove TypeComparators::doTypesOverlap()
    • Remove DocumentValidator::isError()
    • Remove DocumentValidator::append()
    • Remove Utils::getVariableType() in favor of Utils::printSafe()
    • Remove warning for passing isDeprecated in field definition config
    • Remove WrappingType::getWrappedType() argument $recurse in favor of WrappingType::getInnermostType()
    • Remove Type::assertType()
    • Remove ListOfType::$ofType, ListOfType::getOfType() and NonNull::getOfType()
    • Remove option commentDescriptions from BuildSchema::buildAST(), BuildSchema::build() and Printer::doPrint()
    • Remove parameter $options from ASTDefinitionBuilder
    • Remove FieldDefinition::create() in favor of new FieldDefinition()
    • Remove GraphQL\Exception\InvalidArgument
    • Remove Utils::find(), Utils::every() and Utils::invariant()
    • Remove argument bool $exitWhenDone from StandardServer::send500Error() and StandardServer::handleRequest()
    • Remove Schema::getAstNode() in favor of Schema::$astNode
    • Remove ability to override standard types through Schema option types, use Type::overrideStandardTypes()
    • Remove GraphQL\Utils\TypeInfo::typeFromAST(), use GraphQL\Utils\AST::typeFromAST()
    • Remove StandardServer::send500Error(), handle non-GraphQL errors yourself
    • Remove StandardServer::getHelper(), use new Helper
    • Remove error extension field category, use custom error formatting if you still need it
    • Remove deprecated Type::getInternalTypes()
    • Remove deprecated GraphQL::execute()
    • Remove deprecated GraphQL::executeAndReturnResult()
    • Remove deprecated experimental CoroutineExecutor
    • Remove deprecated FormattedError::create() and FormattedError::createFromPHPError()
    • Remove deprecated GraphQL::setPromiseAdapter()
    • Remove deprecated AST::getOperation()
    • Remove deprecated constants from BreakingChangesFinder
    • Remove deprecated DocumentValidator::isValidLiteralValue()
    • Remove deprecated Error::formatError() and Error::toSerializableArray()
    • Remove deprecated GraphQL::getInternalDirectives()
    • Remove deprecated Schema::isPossibleType()
    • Remove deprecated methods from TypeInfo
    • Remove deprecated Values::valueFromAST() and Values::isValidPHPValue()
    • Remove deprecated public property access to InputObjectField::$type
    • Remove deprecated public property access to FieldDefinition::$type
    • Remove alias GraphQL\Validator\Rules\AbstractQuerySecurity, use GraphQL\Validator\Rules\QuerySecurityRule
    • Remove alias GraphQL\Validator\Rules\AbstractValidationRule, use GraphQL\Validator\Rules\ValidationRule
    • Remove alias GraphQL\Utils\FindBreakingChanges, use GraphQL\Utils\BreakingChangesFinder
    Source code(tar.gz)
    Source code(zip)
  • v15.0.0-alpha.2(Oct 19, 2022)

    Changed

    • PHP version required: 7.4+
    • Propagate error message and stack trace for why leaf value serialization failed
    • Do not throw client safe Error when failing to serialize an Enum type
    • Use native PHP types for properties of Type and its subclasses
    • Throw SerializationError over client safe Error when failing to serialize leaf types
    • Move debug entries in errors under extensions key
    • Use native PHP types wherever possible
    • Always throw RequestError with useful message when clients provide an invalid JSON body
    • Move class BlockString from namespace GraphQL\Utils to GraphQL\Language
    • Return string-keyed arrays from GraphQL::getStandardDirectives(), GraphQL::getStandardTypes() and GraphQL::getStandardValidationRules()
    • Move complexity related code from FieldDefinition to QueryComplexity
    • Exclude unused standard types from the schema
    • Require lazy type loader to return Type directly without an intermediary callable
    • Allow lazy type loader to return null
    • Rename ServerConfig option persistentQueryLoader to persistedQueryLoader
    • Call previously unused methods EnumType::parseValue() and EnumType::parseLiteral()
    • Strongly type PromiseAdapter::createRejected() to require \Throwable
    • Move members specific to NamedType out of Type: $name, $description, $config, isBuiltInType(), assertValid()
    • Always convert recursively when calling Node::toArray()
    • Make Directive::$config['args'] use the same definition style as FieldDefinition::$config['args']
    • Rename FieldArgument to Argument
    • Make errors when parsing scalar literals more precise
    • Change expected QueryPlan options from ['group-implementor-fields'] to ['groupImplementorFields' => true] in ResolveInfo::lookAhead()
    • Always convert promises through PromiseAdapter::convertThenable() before calling ->then() on them
    • Use JSON_THROW_ON_ERROR in json_encode()
    • Validate some internal invariants through assert()
    • PromiseAdapter::all() accepts iterable
    • Throw if Introspection::fromSchema() returns no data
    • Reorganize abstract class ASTValidationContext to interface ValidationContext
    • Reorganize AST interfaces related to schema and type extensions
    • Align Utils::suggestionList() with the reference implementation (#1075)
    • Order schema topologically and according to the user-defined order, affects introspection and printing
    • GraphQL\Utils\AST::typeFromAST() now needs a type loader callable instead of the Schema
    • Do not change HTTP status code in StandardServer
    • Use " instead of """ for single line descriptions
    • Make Helper::emitResponse() private, use Helper::sendResponse()
    • Emit unescaped UTF-8 from StandardServer
    • Sync input value coercion with graphql-js reference implementation

    Added

    • Improve extendability of validator rules
    • Add tests for errors that occur when undeclared fields are passed in input
    • Warn about orphaned object types
    • Expose structured enumeration of directive locations
    • Add AST::concatAST() utility
    • Allow lazy input object fields
    • Add validation rule UniqueEnumValueNames
    • Add SDL validation rule UniqueOperationTypes (#995)
    • Add ability to remove custom validation rules after adding them via DocumentValidator::removeRule()
    • Allow lazy enum values
    • Make Node implement JsonSerializable
    • Add SDL validation rule UniqueTypeNames (#998)
    • Add support for SDL validation to KnownTypeNames rule (#999)
    • Add SDL validation rule UniqueArgumentDefinitionNames (#1136)
    • Add parseValue config option to InputObjectType to parse input value to custom value object
    • Add option sortTypes to have SchemaPrinter order types alphabetically
    • Allow constructing EnumType from PHP enum
    • Add TypeInfo::getParentTypeStack() and TypeInfo::getFieldDefStack()
    • Include path to faulty input in coercion errors
    • Add ability to resolve abstract type of object via __typename

    Optimized

    • Use recursive algorithm for printer and improve its performance
    • Use foreach over slower functions array_map() and Utils::map()

    Fixed

    • Avoid QueryPlan crash when multiple $fieldNodes are present
    • Clarify error when attempting to coerce anything but array or stdClass to an input object
    • Allow directives on variable definitions
    • Handle null parent of list in ValuesOfCorrectType::getVisitor
    • Allow sending both query and queryId, ignore queryId in that case
    • Preserve extended methods from class-based types in SchemaExtender::extend()
    • Fix printing of empty types (#940)
    • Clone NodeList in Node::cloneDeep()
    • Calling Schema::getType() on a schema built from SDL returns null for unknown types (#1068)
    • Avoid crash on typeless inline fragment when using QueryComplexity rule
    • Avoid calling FormattedError::addDebugEntries() twice when using default error formatting
    • Avoid calling defined functions named like lazily loaded types
    • Show actual error in debug entries

    Removed

    • Remove OperationParams method getOriginalInput() in favor of public property $originalInput
    • Remove OperationParams method isReadOnly() in favor of public property $readOnly
    • Remove Utils::withErrorHandling()
    • Remove TypeComparators::doTypesOverlap()
    • Remove DocumentValidator::isError()
    • Remove DocumentValidator::append()
    • Remove Utils::getVariableType() in favor of Utils::printSafe()
    • Remove warning for passing isDeprecated in field definition config
    • Remove WrappingType::getWrappedType() argument $recurse in favor of WrappingType::getInnermostType()
    • Remove Type::assertType()
    • Remove ListOfType::$ofType, ListOfType::getOfType() and NonNull::getOfType()
    • Remove option commentDescriptions from BuildSchema::buildAST(), BuildSchema::build() and Printer::doPrint()
    • Remove parameter $options from ASTDefinitionBuilder
    • Remove FieldDefinition::create() in favor of new FieldDefinition()
    • Remove GraphQL\Exception\InvalidArgument
    • Remove Utils::find(), Utils::every() and Utils::invariant()
    • Remove argument bool $exitWhenDone from StandardServer::send500Error() and StandardServer::handleRequest()
    • Remove Schema::getAstNode() in favor of Schema::$astNode
    • Remove ability to override standard types through Schema option types, use Type::overrideStandardTypes()
    • Remove GraphQL\Utils\TypeInfo::typeFromAST(), use GraphQL\Utils\AST::typeFromAST()
    • Remove StandardServer::send500Error(), handle non-GraphQL errors yourself
    • Remove StandardServer::getHelper(), use new Helper
    • Remove error extension field category, use custom error formatting if you still need it
    • Remove deprecated Type::getInternalTypes()
    • Remove deprecated GraphQL::execute()
    • Remove deprecated GraphQL::executeAndReturnResult()
    • Remove deprecated experimental CoroutineExecutor
    • Remove deprecated FormattedError::create() and FormattedError::createFromPHPError()
    • Remove deprecated GraphQL::setPromiseAdapter()
    • Remove deprecated AST::getOperation()
    • Remove deprecated constants from BreakingChangesFinder
    • Remove deprecated DocumentValidator::isValidLiteralValue()
    • Remove deprecated Error::formatError() and Error::toSerializableArray()
    • Remove deprecated GraphQL::getInternalDirectives()
    • Remove deprecated Schema::isPossibleType()
    • Remove deprecated methods from TypeInfo
    • Remove deprecated Values::valueFromAST() and Values::isValidPHPValue()
    • Remove deprecated public property access to InputObjectField::$type
    • Remove deprecated public property access to FieldDefinition::$type
    • Remove alias GraphQL\Validator\Rules\AbstractQuerySecurity, use GraphQL\Validator\Rules\QuerySecurityRule
    • Remove alias GraphQL\Validator\Rules\AbstractValidationRule, use GraphQL\Validator\Rules\ValidationRule
    • Remove alias GraphQL\Utils\FindBreakingChanges, use GraphQL\Utils\BreakingChangesFinder
    Source code(tar.gz)
    Source code(zip)
  • v15.0.0-alpha.1(Oct 15, 2022)

    Changed

    • PHP version required: 7.4+
    • Propagate error message and stack trace for why leaf value serialization failed
    • Do not throw client safe Error when failing to serialize an Enum type
    • Use native PHP types for properties of Type and its subclasses
    • Throw SerializationError over client safe Error when failing to serialize leaf types
    • Move debug entries in errors under extensions key
    • Use native PHP types wherever possible
    • Always throw RequestError with useful message when clients provide an invalid JSON body
    • Move class BlockString from namespace GraphQL\Utils to GraphQL\Language
    • Return string-keyed arrays from GraphQL::getStandardDirectives(), GraphQL::getStandardTypes() and GraphQL::getStandardValidationRules()
    • Move complexity related code from FieldDefinition to QueryComplexity
    • Exclude unused standard types from the schema
    • Require lazy type loader to return Type directly without an intermediary callable
    • Allow lazy type loader to return null
    • Rename ServerConfig option persistentQueryLoader to persistedQueryLoader
    • Call previously unused methods EnumType::parseValue() and EnumType::parseLiteral()
    • Strongly type PromiseAdapter::createRejected() to require \Throwable
    • Move members specific to NamedType out of Type: $name, $description, $config, isBuiltInType(), assertValid()
    • Always convert recursively when calling Node::toArray()
    • Make Directive::$config['args'] use the same definition style as FieldDefinition::$config['args']
    • Rename FieldArgument to Argument
    • Make errors when parsing scalar literals more precise
    • Change expected QueryPlan options from ['group-implementor-fields'] to ['groupImplementorFields' => true] in ResolveInfo::lookAhead()
    • Always convert promises through PromiseAdapter::convertThenable() before calling ->then() on them
    • Use JSON_THROW_ON_ERROR in json_encode()
    • Validate some internal invariants through assert()
    • PromiseAdapter::all() accepts iterable
    • Throw if Introspection::fromSchema() returns no data
    • Reorganize abstract class ASTValidationContext to interface ValidationContext
    • Reorganize AST interfaces related to schema and type extensions
    • Align Utils::suggestionList() with the reference implementation (#1075)
    • Order schema topologically and according to the user-defined order, affects introspection and printing
    • GraphQL\Utils\AST::typeFromAST() now needs a type loader callable instead of the Schema
    • Do not change HTTP status code in StandardServer
    • Use " instead of """ for single line descriptions
    • Make Helper::emitResponse() private, use Helper::sendResponse()
    • Emit unescaped UTF-8 from StandardServer
    • Sync input value coercion with graphql-js reference implementation

    Added

    • Improve extendability of validator rules
    • Add tests for errors that occur when undeclared fields are passed in input
    • Warn about orphaned object types
    • Expose structured enumeration of directive locations
    • Add AST::concatAST() utility
    • Allow lazy input object fields
    • Add validation rule UniqueEnumValueNames
    • Add SDL validation rule UniqueOperationTypes (#995)
    • Add ability to remove custom validation rules after adding them via DocumentValidator::removeRule()
    • Allow lazy enum values
    • Make Node implement JsonSerializable
    • Add SDL validation rule UniqueTypeNames (#998)
    • Add support for SDL validation to KnownTypeNames rule (#999)
    • Add SDL validation rule UniqueArgumentDefinitionNames (#1136)
    • Add parseValue config option to InputObjectType to parse input value to custom value object
    • Add option sortTypes to have SchemaPrinter order types alphabetically
    • Allow constructing EnumType from PHP enum
    • Add TypeInfo::getParentTypeStack() and TypeInfo::getFieldDefStack()
    • Include path to faulty input in coercion errors

    Optimized

    • Use recursive algorithm for printer and improve its performance
    • Use foreach over slower functions array_map() and Utils::map()

    Fixed

    • Avoid QueryPlan crash when multiple $fieldNodes are present
    • Clarify error when attempting to coerce anything but array or stdClass to an input object
    • Allow directives on variable definitions
    • Handle null parent of list in ValuesOfCorrectType::getVisitor
    • Allow sending both query and queryId, ignore queryId in that case
    • Preserve extended methods from class-based types in SchemaExtender::extend()
    • Fix printing of empty types (#940)
    • Clone NodeList in Node::cloneDeep()
    • Calling Schema::getType() on a schema built from SDL returns null for unknown types (#1068)
    • Avoid crash on typeless inline fragment when using QueryComplexity rule
    • Avoid calling FormattedError::addDebugEntries() twice when using default error formatting
    • Avoid calling defined functions named like lazily loaded types
    • Show actual error in debug entries

    Removed

    • Remove deprecated Type::getInternalTypes()
    • Remove deprecated GraphQL::execute()
    • Remove deprecated GraphQL::executeAndReturnResult()
    • Remove deprecated experimental CoroutineExecutor
    • Remove deprecated FormattedError::create() and FormattedError::createFromPHPError()
    • Remove deprecated GraphQL::setPromiseAdapter()
    • Remove deprecated AST::getOperation()
    • Remove deprecated constants from BreakingChangesFinder
    • Remove deprecated DocumentValidator::isValidLiteralValue()
    • Remove deprecated Error::formatError() and Error::toSerializableArray()
    • Remove deprecated GraphQL::getInternalDirectives()
    • Remove deprecated Schema::isPossibleType()
    • Remove deprecated methods from TypeInfo
    • Remove deprecated Values::valueFromAST() and Values::isValidPHPValue()
    • Remove deprecated public property access to InputObjectField::$type
    • Remove deprecated public property access to FieldDefinition::$type
    • Remove alias GraphQL\Validator\Rules\AbstractQuerySecurity, use GraphQL\Validator\Rules\QuerySecurityRule
    • Remove alias GraphQL\Validator\Rules\AbstractValidationRule, use GraphQL\Validator\Rules\ValidationRule
    • Remove alias GraphQL\Utils\FindBreakingChanges, use GraphQL\Utils\BreakingChangesFinder
    • Remove OperationParams method getOriginalInput() in favor of public property $originalInput
    • Remove OperationParams method isReadOnly() in favor of public property $readOnly
    • Remove Utils::withErrorHandling()
    • Remove TypeComparators::doTypesOverlap()
    • Remove DocumentValidator::isError()
    • Remove DocumentValidator::append()
    • Remove Utils::getVariableType() in favor of Utils::printSafe()
    • Remove warning for passing isDeprecated in field definition config
    • Remove WrappingType::getWrappedType() argument $recurse in favor of WrappingType::getInnermostType()
    • Remove Type::assertType()
    • Remove ListOfType::$ofType, ListOfType::getOfType() and NonNull::getOfType()
    • Remove option commentDescriptions from BuildSchema::buildAST(), BuildSchema::build() and Printer::doPrint()
    • Remove parameter $options from ASTDefinitionBuilder
    • Remove FieldDefinition::create() in favor of new FieldDefinition()
    • Remove GraphQL\Exception\InvalidArgument
    • Remove Utils::find(), Utils::every() and Utils::invariant()
    • Remove argument bool $exitWhenDone from StandardServer::send500Error() and StandardServer::handleRequest()
    • Remove Schema::getAstNode() in favor of Schema::$astNode
    • Remove ability to override standard types through Schema option types, use Type::overrideStandardTypes()
    • Remove GraphQL\Utils\TypeInfo::typeFromAST(), use GraphQL\Utils\AST::typeFromAST()
    • Remove StandardServer::send500Error(), handle non-GraphQL errors yourself
    • Remove StandardServer::getHelper(), use new Helper
    Source code(tar.gz)
    Source code(zip)
  • v14.11.8(Sep 21, 2022)

  • v14.11.7(Sep 21, 2022)

  • v14.11.6(Apr 13, 2022)

  • v14.11.5(Jan 24, 2022)

  • v14.11.4(Jan 20, 2022)

  • v14.11.3(Nov 19, 2021)

  • v14.11.2(Nov 18, 2021)

  • v14.11.1(Nov 15, 2021)

  • v14.11.0(Oct 29, 2021)

  • v14.10.0(Oct 28, 2021)

  • v14.9.0(Jun 15, 2021)

  • v14.8.0(Jun 1, 2021)

  • v14.7.0(May 17, 2021)

  • v14.6.4(May 11, 2021)

  • v14.6.3(May 10, 2021)

  • v14.6.2(Apr 23, 2021)

  • v14.6.1(Mar 29, 2021)

  • v14.6.0(Mar 29, 2021)

  • v14.5.1(Feb 5, 2021)

  • v14.5.0(Jan 23, 2021)

    Feat:

    • Implement support for interfaces implementing interfaces (#740), huge kudos to @Kingdutch

    Deprecates:

    • Constant BreakingChangeFinder::BREAKING_CHANGE_INTERFACE_REMOVED_FROM_OBJECT. Use BreakingChangeFinder::BREAKING_CHANGE_IMPLEMENTED_INTERFACE_REMOVED instead. Constant value also changed from INTERFACE_REMOVED_FROM_OBJECT to IMPLEMENTED_INTERFACE_REMOVED.

    • Constant BreakingChangeFinder::DANGEROUS_CHANGE_INTERFACE_ADDED_TO_OBJECT Use DANGEROUS_CHANGE_IMPLEMENTED_INTERFACE_ADDED instead. Constant value also changed from INTERFACE_ADDED_TO_OBJECT to IMPLEMENTED_INTERFACE_ADDED.

    Refactoring:

    • Reify AST node types and remove unneeded nullability (#751)
    Source code(tar.gz)
    Source code(zip)
  • v14.4.1(Jan 23, 2021)

    Fix:

    • Allow pushing nodes to NodeList via []= (#767)
    • Fix signature of Error\FormattedError::prepareFormatter() to address PHP8 deprecation (#742)
    • Do not add errors key to result when errors discarded by custom error handler (#766)
    Source code(tar.gz)
    Source code(zip)
  • v14.4.0(Dec 3, 2020)

    • Fixed SchemaPrinter so that it uses late static bindings when extended (#747)
    • Parse DirectiveDefinitionNode->locations as NodeList<NamedNode> (fixes AST::fromArray conversion) (#723)
    • Parse Parser::implementsInterfaces as NodeList<NamedTypeNode> (fixes AST::fromArray conversion)
    • Fix signature of Parser::unionMemberTypes to match actual NodeList<NamedTypeNode>
    Source code(tar.gz)
    Source code(zip)
  • v14.3.0(Aug 23, 2020)

    New:

    • Allow typeLoader to return a type thunk (#687)

    Fix:

    • Read getParsedBody() instead of getBody() when Request is ServerRequest (#715)
    • Fix default get/set behavior on InputObjectField and FieldDefinition (#716)
    Source code(tar.gz)
    Source code(zip)
  • v14.2.0(Aug 14, 2020)

  • v14.1.1(Jul 21, 2020)

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
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
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
GraPHPinator ⚑ 🌐 ⚑ Easy-to-use & Fast GraphQL server implementation for PHP

Easy-to-use & Fast GraphQL server implementation for modern PHP. Includes features from latest draft, middleware directives and modules with extra functionality.

Infinityloop.dev 34 Dec 14, 2022
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
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
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
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
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
πŸžπŸ§‘β€πŸ³ 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
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