Netlify, apollo_lambda_server, graphql, and files with .gql extensions

Getting this error when executing netlify dev:

────────────────────────────────────────────────────────────────
  1. Run command for local development                          
────────────────────────────────────────────────────────────────
​
◈ Starting Netlify Dev with Create React App
✔ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml
​
(dev.command completed in 125ms)
✘ [ERROR] No loader is configured for ".gql" files: netlify/functions/pgnfen/schema.gql

    netlify/functions/pgnfen/pgnfen.js:3:21:
      3 │ import typeDefs from "./schema.gql" 
        ╵    

I’m using esbuild. Here’s the .toml:

[build]
  command = "react-scripts build"
  publish = "build"
  build = "esbuild"

[functions]
  directory = "netlify/functions"

The reason I use .gql instead of .js extension is that vscode recognizes it and gives me GraphQL syntax highlighting in the editor. Is there anyway past this apparent webpack error?

Okay, I found a way around this by using a config file or gql tag. Closing.

Hey there, @JeffML :wave:

Thanks for coming back and sharing this. Happy building :rocket: