Spring for Graph QL Schema Mapping Inspection
This is a tutorial that demonstrates the new Schema Mapping Inspection in Spring for GraphQL. If a query, mutation, or subscription operation does not have a DataFetcher, it wont return any data, and wont do anything useful. Likewise, fields on schema types returned by an operation that are covered neither explicitly through a DataFetcher registration, nor implicitly by the default PropertyDataFetcher, which looks for a matching Java object property, will always be null. In complex applications this can be difficult to debug and this feature aims to make that easier. On startup, Spring for GraphQL can inspect schema fields, DataFetcher registrations, and the properties of Java objects returned from DataFetcher implementations to check if all schema fields are covered either by an explicitly registered DataFetcher, or a matching Java object property. The inspection also performs a reverse check looking for DataFetcher registrations against schema fields that dont exist.
|
|