nextron icon indicating copy to clipboard operation
nextron copied to clipboard

How can I use graphql.tsx generated by graqphql-nexus?

Open pruge opened this issue 3 years ago • 0 comments

When using graphql.tsx created by grqphql-nexus, the following error occurs. I had no problems using it with nextjs. How can I solve the problem?

import {useRemoveAllPostMutation} from '@graphql/generated/graphql'

const [removeAllPostMutation, {data, loading, error}] = useRemoveAllPostMutation()
error - ../graphql_/generated/graphql.tsx
Module parse failed: Unexpected token (3:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { gql } from '@apollo/client';
| import * as Apollo from '@apollo/client';
> export type Maybe<T> = T | null;
| export type InputMaybe<T> = Maybe<T>;
| export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };

pruge avatar Dec 29 '21 14:12 pruge