Skip to content

Should MutableObjectTypeAdapter be setting description? #697

@joelcollinsdc

Description

@joelcollinsdc

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions