As a maintainer of graphql-plugin-typegen, I have been thinking about an ergonomic way to provide GraphQL types in the Gatsby project for a long time.
In the first version of the plugin, users always had to directly import the type definitions from the generated files.
import * as React from 'react';