graphqlite
graphqlite copied to clipboard
Should MutableObjectTypeAdapter be setting description?
trafficstars
I'm just trying to get my head around this library works, I tried adding a static type defition mapping like so:
$myStaticTypeMapper = new StaticTypeMapper();
$myStaticTypeMapper->setTypes([
Example::class => new ExampleOutputType(),
]);
$schemaFactory->addTypeMapper($myStaticTypeMapper);
When I run
SchemaPrinter::doPrint($schema);
And I get an error that there is no description set on the MutableObjectTypeAdapter that is wrapping ExampleOutputType. It appears the printer calls $def->description even though the mutable object type adapter never sets a description.
Guessing i'm trying to use the static type mapper incorrectly, but figured i'd ask, thanks!