graphqlite icon indicating copy to clipboard operation
graphqlite copied to clipboard

Should MutableObjectTypeAdapter be setting description?

Open joelcollinsdc opened this issue 1 year ago • 4 comments
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!

joelcollinsdc avatar Aug 13 '24 22:08 joelcollinsdc