-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Unexpected identifier #587
Comments
@akoskm Were you able to solve this problem? |
@Isomorpheus no, I didn't work on this. This is still an open issue in our project. I will update you once we have a solution. |
@akoskm Were you able to solve this problem? |
@juancampuzano see my comment above. |
I was facing the same issue and I solved it by using this library - https://github.com/evenchange4/graphql.macro |
Hey @akoskm 👋 Would you be able to create a minimal, runnable reproduction of this issue? The webpack loader typically works well, so it would be helpful to understand if this issue is related to the way you've set up your project, or if there is some other change we need to be aware of in the library itself. Thanks! |
I'm facing this issue as well. If i put the |
Could you explain how were you able to solve the problem by using |
Fortunately, a solution found by using https://github.com/ardatan/graphql-import-node
import gql from 'graphql-tag';
import 'graphql-import-node';
import q1 from "./q1-customizations.graphql";
export const commonApiExtensions = gql`
${q1}
`;
ts-node -r graphql-import-node/register ./src/index.ts OR node-dev -r graphql-import-node/register ./src/index.ts |
I'm trying to import a
.graphql
file in a file calledmain.ts
.I set up the webpack loader according to the readme file https://github.com/apollographql/graphql-tag#webpack-loading-and-preprocessing
Here's how the file is imported:
and the error I'm getting:
The relevant part of my webpack configuration:
and here's the query:
The text was updated successfully, but these errors were encountered: