youshido/graphql
A PHP GraphQL library for building schemas and executing queries with a type-safe, object-oriented API. Define types, fields, resolvers, and middleware in code, with support for input validation, custom scalars, and introspection for PHP apps.
TypeService::getPropertyValue()null as a default valueConfigurationException when trying to add two types with the same name to the schemagetImplementations() method to AbstractInterfaceType, can be used to properly discover all possible types during introspectionTests directory to tests for consistency with other projectsBug Fixes:
https://github.com/Youshido/GraphQL/issues/148 GraphQL error when providing a default value for variables https://github.com/Youshido/GraphQL/issues/144 GraphQL error when not passing value for optional variables https://github.com/Youshido/GraphQL/issues/147 DateTime/Enum types doesn't show invalid input data
Despite being a minor update this version might require you to change a few things in your code.
DateTimeType and DateTimeTzType types are now working properly and parsing your input string into the \DateTime object in PHP. Also you can specify the exact format of the DateType when creating a field in constructor (for examplenew DateTimeType("m/d/Y H:ia")) .EnumType now can return null values as it is in the official JS library and properly use name and value if they are not equal (e.g. {value: 1, name: "ACTIVE"}null values as valid valuesThis release doesn't break backward compatibility.
Completely revamped Processor, which now has the proper behaviour for nested structure including:
new NonNullType(new ObjectType()) now returns the correct nameAll closed issues are covered with relevant unit tests.
Important Notice
Enum default value has to be set using the value, not the name part.
So the proper use would be:
'status' => [
'type' => new EnumType([
'name' => 'Statue',
'values' => [
[
'name' => 'ACTIVE',
'value' => 1
],
[
'name' => 'DELETED',
'value' => 2
]
]
]),
'defaultValue' => 1
],
Current version brings relay support, 99% test coverage, improved Schema structure and performance improvement.
All changes are described in the Changelog-1.1. You can also look at Upgrade-1.1 to see how you can quickly update your current codebase.
Refactored documentation
This version has updated documentation and slightly updated examples with InputObjectType.
No major changes were introduced in this release.
Stable version with documentation
refactored version
How can I help you explore Laravel packages today?