Skip to content

SchemaPrinter improvements/fixes

Compare
Choose a tag to compare
@LastDragon-ru LastDragon-ru released this 13 Mar 09:51
0.13.0
44cae2a
Breaking changes

Features

  • graphql/SchemaPrinter: DirectiveResolver::getDefinitions() will also return standard directives (to be consistent with types). (633571b) ☣
  • graphql/SchemaPrinter: GraphQLExpectedSchema can define own Settings. (d6bae80)
  • graphql/SchemaPrinter: IntrospectionPrinter will return only introspection types as unused. (0601bb8)
  • graphql/SchemaPrinter: PrintedSchema::getUnusedTypes() will also return standard types. (3402e22)
  • graphql/SchemaPrinter: SchemaPrinter will use DirectiveFilter for standard directives too. (e33f957) ☣
  • graphql/SchemaPrinter: Added PrintedSchema contract. (2604f35)
  • graphql/SchemaPrinter: Added PrintedSchema::getUnusedDirectives() that will return all unused directives. (d1a8130)
  • graphql/SchemaPrinter: Added Settings::getDirectiveDefinitionFilter() that allow exclude Directive Definitions. (6583742) ☣
  • graphql/SchemaPrinter: Added Settings::getTypeDefinitionFilter() that allows filter out type definitions. (504a252) ☣
  • graphql: GraphQLAssertions::assertGraphQLSchemaEquals() update to allow PrintedSchema and Schema as $expected. (bbff36b) ☣

Bug Fixes

  • graphql/@sortBy: _ will work with @paginate. (ca43d21), closes #12
  • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not interpret empty used/unused types/directives lists as "skip assert" (assertion will be skipped only if null). (b722c1c) ☣
  • graphql/SchemaPrinter: GraphQLAssertions::assertGraphQLSchemaEquals() will not print expected schema when not necessary. (1cffe6a)
  • testing: registration of StrictAssertEquals. (d6e7b50)

Performance Improvements

  • graphql/SchemaPrinter: DirectiveResolver will not load all lighthouse's directives (because they are not needed + it is very slow) and will cache definitions/instances. (b61a248) ☣

Code Refactoring

  • graphql: Minimal version of "nuwave/lighthouse" set to ^5.8.0. (25816cc) ☣