I'm loading .graphql files like this:
import { join } from 'path'
import { loadSchemaSync } from '@graphql-tools/load'
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader'
import { addResolversToSchema } from '@graphql-tools/schema'
import resolvers from './resolvers'
const schema = loadSchemaSync(join(__dirname, './typedefs/*.graphql'), { loaders: [new GraphQLFileLoader()] })
const schemaWithResolver = addResolversToSchema({
schema,
resolvers
})
export default schemaWithResolver
When I build for production, the folder ./typedefs is not included in the build output (dist).
This is the build cmd: "build-babel": "babel ./src -s -d dist"
How do include .graphql extensions in the babel cmd above?