code: def invalid_return_type_error(
      return_type: GraphQLObjectType, result: Any, field_nodes: List[FieldNode]
  ) -> GraphQLError:
      
      return GraphQLError(
          f"Expected value of type '{return_type.name}' but got: {inspect(result)}.",
          field_nodes,
      )
docs: Create a GraphQLError for an invalid return type.