The callback data producer provided an easy way to resolve (part of) a field with a closure defined in the Schema(Extension) plugin. Closures in PHP are not serializable and as such adding data producers to the schema in this manner prevents the cachability of the ResolverRegistry and the resulting schema as a whole. To enable further optimizing the assembly of the GraphQL schema in the future it's desirable that the ResolverRegistry and Schema are cachable.
To make this possible in future versions of the module we're deprecating the addition of closures in resolvers and in the future this will cause downstream serialization errors.
Replace any callback functions with proper data producer classes that implement Drupal\graphql\Plugin\DataProducerPluginInterface (e.g. by extending Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase).