Closed mathieutu closed 3 years ago
Thanks for you PR @mathieutu!
I took the liberty of renaming the method schema()
(to better match the existing ones), update the CHANGELOG and add a test. I'm looking forward to getting this merged soon!
@emil-nasso @ttrig can you please have a look at this?
Actually now I'm playing with extending/replacing the whole shema, maybe we can split that in a sdlSchemaString
or something like that, and another true schema
method which return the schema object.
public function schema(): \GraphQL\Type\Schema
{
return BuildSchema::build($this->getSDLSchema(), [$this, 'decorateTypeConfig']);
}
@mathieutu I'm thinking extendSchema(\GraphQL\Type\Schema): \GraphQL\Type\Schema
, so you don't need to build everything (including resolving the schema content and appending decorateTypeConfig
) from scratch. The default implementation would be an no-op just returning the provided schema.
Conflicts fixed and commits squashed in #40
Hi, I've extracted an getSchema methods, which allows to override it to get several scheme, merge them, or custom the way we get it generally.
Thanks.