Skip to content

Completely revamped Processor

Compare
Choose a tag to compare
@viniychuk viniychuk released this 09 Nov 03:06
· 269 commits to master since this release

This release doesn't break backward compatibility.

Completely revamped Processor, which now has the proper behaviour for nested structure including:

  • Fragments on Unions and Interfaces
  • NonNullable in different configurations, e.g. NonNull of List of NonNullable and so on
  • Invalid queries like { user { name { } } } are now throwing proper errors
  • Optional arguments now work correctly (but don't forget to list them with a null value, otherwise you will get an error according to the graphql spec)
  • __typanme on new NonNullType(new ObjectType()) now returns the correct name

All 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
],