laravel-graphql icon indicating copy to clipboard operation
laravel-graphql copied to clipboard

resolveType arguments do not match documentation

Open lukeify opened this issue 6 years ago • 0 comments

According to the documentation on interfaces for this repository, the resolveType method receives an argument $root, as so:

   public function resolveType($root)
    {
        // Use the resolveType to resolve the Type which is implemented trough this interface
        $type = $root['type'];
        if ($type === 'human') {
            return GraphQL::type('Human');
        } else if  ($type === 'droid') {
            return GraphQL::type('Droid');
        }
    }

This does not appear to be the case currently:

screen shot 2018-08-31 at 12 57 14 pm screen shot 2018-08-31 at 12 56 15 pm

lukeify avatar Aug 31 '18 00:08 lukeify