apollo
apollo copied to clipboard
gql files not resolving by babel - only in circleci
Version
Reproduction link
https://circleci.com/gh/circusliving/amp/32
Steps to reproduce
the files resolve fine everywhere except in circleci's node circleci/node:latest. I have tried with and without extension gql
What is expected ?
the files to resolve
What is actually happening?
Module not found: Error: Can't resolve '../apollo/webPageByPath.gql' in 'modules'
Additional comments?
I have "graphql-tag": "^2.10.1", in my deps
@dohomi do you have any idea?
Usually webpack is taking care of the graphql-loader and not babel. For me it sounds you need to add the specific webpack config but I am not sure about it as I haven't worked with circleci.
Maybe take a look at following plugin: https://github.com/gajus/babel-plugin-graphql-tag Just found a crossposting about it.
@dohomi do you have any idea?
To work around I had to change my GQL files to js files exporting gql'' .
Usually webpack is taking care of the graphql-loader and not babel. For me it sounds you need to add the specific webpack config but I am not sure about it as I haven't worked with circleci.
Maybe take a look at following plugin: https://github.com/gajus/babel-plugin-graphql-tag Just found a crossposting about it.
I will give this a try and report back.
@randyhoulahan are you using TypeScript? There is a neat plugin which kind of makes this whole procedure even easier: https://www.npmjs.com/package/ts-transform-graphql-tag
@dohomi not yet unfortunately.
Hello do we have any information on this? My docker build fails on github actions.