Currently, I am utilizing graphql-tag in my project. The structure of my files is as follows:
./operation.graphql
Query User {
...
}
./test.ts
import { User } from './operation.graphql'; /// Module ''*.graphql'' has no exported member 'User'.
./index.d.ts
declare module '*.graphql' {
import { DocumentNode } from 'graphql';
const value:DocumentNode;
export default value;
}
Everything seems to be working fine with the application, but I am aiming to avoid that particular error.
Default importing works without any issues, however, I encounter an error when using named imports.
Any suggestions on how to properly declare this? Your help is appreciated. :)