'Getting More Specific Error Messages For GraphQL in a React App

I'm working on a ReactJS app that has a lot of GraphQL mutations. I was cleaning up some things and fixing up all the files where mutations were housed, and at some point I got hit with this error:

Uncaught GraphQLError: Syntax Error: Expected Name, found "!".
    at syntaxError (syntaxError.mjs:8:1)

Now, I know that this must be due to something in the operations.js folder or somewhere in the React App where a mutation / Query with parameters is house, but that error is giving me little to no help tracking it. I've been unable to find where this could be with the naked eye, is there anything I can do to pinpoint where this error is occuring, i.e. getting a more helpful message than the one above?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source