I've made a few minor changes to make things happier with postgres, but effectively still the same. Doctrine works fine. I can seed the database.
But when I get to making a call...
$ php -S localhost:8000
PHP 5.6.30 Development Server started at Mon Jul 3 09:48:10 2017
Listening on http://localhost:8000
Document root is /Users/jmather/code/php/graphql-mapper-demo
Press Ctrl-C to quit.
curl -XPOST 'http://localhost:8000/entry.php' -d 'query=query FooBar {
luke: hero(episode: EMPIRE) {
id,
name,
friends {
id, name
}
},
droid(id: "2001") {
primaryFunction
}
}'
[Mon Jul 3 09:48:36 2017] ::1:56052 [200]: /entry.php - Call to a member function addImplementation() on string in /Users/jmather/code/php/graphql-mapper-demo/vendor/webonyx/graphql-php/src/Type/Definition/InterfaceType.php on line 54
Tracing this down further, that code is:
/**
* Queue the update of the interfaces to know about this implementation.
* This is an rare and unfortunate use of mutation in the type definition
* implementations, but avoids an expensive "getPossibleTypes"
* implementation for Interface types.
*
* @param ObjectType $impl
*/
public static function addImplementationToInterfaces(ObjectType $impl)
{
self::$_lazyLoadImplementations[] = function() use ($impl) {
/** @var self $interface */
foreach ($impl->getInterfaces() as $interface) {
$interface->addImplementation($impl); // here
}
};
}
So what IS $interface, if it's not the InterfaceType we expect but a STRING?!
or viewed another way...
It looks like somewhere there's a conversion not happening. Any ideas?
Hey! Hoping you can help.
I'm trying to get the demo up and running.
I've made a few minor changes to make things happier with postgres, but effectively still the same. Doctrine works fine. I can seed the database.
But when I get to making a call...
Tracing this down further, that code is:
So what IS $interface, if it's not the InterfaceType we expect but a STRING?!
or viewed another way...
It looks like somewhere there's a conversion not happening. Any ideas?