How to import .graphql files #7411
-
|
Hi, using webpack I used to import graphql files directly in my modules: next.config.js config.module.rules.push(
{
test: /\.graphql/,
type: 'asset/source',
generator: {
filename: 'static/chunks/[path][name].[hash][ext]',
},
},
)then in my modules I would do: import rootDef from './root/root.graphql'
const schema = makeExecutableSchema({
typeDefs: [rootDef],
resolvers: ...,
})now turbopack does not recognize importing of .graphql files out of the box, how do I approach this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I am in a similar situation, I use NextJS and the webpack option we have to load .graphql files This loads .gql files as Here is also a relevant SO question |
Beta Was this translation helpful? Give feedback.
-
|
Hi, thanks for the question. This repository is for Turborepo. For discussions about Turbopack, please post in the Next.js repo. Thank you! |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the question.
This repository is for Turborepo. For discussions about Turbopack, please post in the Next.js repo.
Thank you!