Open chrise86 opened 3 years ago
I ran into this as well, after digging around through docs for a while the fix was actually pretty simple, I was mistakenly using the client config structure when I needed to use the server config structure.
// this one doesn't work
module.exports = {
client: {
service: {
addTypeName: false,
name: 'star-wars-api-overlay',
localSchemaFile: './src/schemas/schema.gql',
},
},
};
// This one works
module.exports = {
service: {
addTypeName: false,
localSchemaFile: './src/schemas/schema.gql',
},
};
Intended outcome:
When running:
I would expect to get types generated.
Actual outcome:
How to reproduce the issue:
Not able to share the repo, but it's a fresh React Native app with the dependencies listed below. I tried running using
apollo@latest
andapollo@2.30.2
. Also tried clearing thenode_modules
folder and reinstalling to no avail.apollo.config.js
:Versions
UPDATE: simplifying
apollo.config.js
to the following seems to fix:It looks like it's the
includes
. Changing the line to the following fixes:Not sure if this is an issue or not. It happens that in my case I don't need to include anything outside of the
src
folder. Could it be a lack ofexcludes
, and so it's scanning the node modules folder? This hasn't happened on previous projects.