Now using node v8.15.0 (npm v6.4.1) › Warning: apollo update available from 2.16.3 to 2.17.4. ++ npx --no-install apollo codegen:generate --target=swift '--includes=./**/*.graphql' --localSchemaFile=schema.json API.swift › Warning: apollo update available from 2.16.3 to 2.17.4. Loading Apollo Project [started] { Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined at Object.error (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/@oclif/errors/lib/index.js:22:17) at Generate.error (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/@oclif/command/lib/command.js:57:23) at OclifLoadingHandler.showError (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/apollo/lib/OclifLoadingHandler.js:28:22) at OclifLoadingHandler.handle (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/apollo/lib/OclifLoadingHandler.js:13:18) at <anonymous> oclif: { exit: 2 }, code: undefined } Loading Apollo Project [failed] → Error initializing Apollo GraphQL project "Unnamed Project": Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined › Error: Error initializing Apollo GraphQL project "Unnamed Project": Error: › Error in "Loading schema for Unnamed Project": TypeError: Cannot read › property 'reduce' of undefined Command /bin/sh failed with exit code 2
I am so much frustrated due to lack of documentation of Apollo ios. it has been more than a week I am trying to use graphQL in my ios app. I resolve all errors but now stuck in this one and don't know the solution.
one thing which I have noticed in this project is lack of compatibility with old and different version os required libs.
- To make it run you have to update from Xcode (swift 5).
- Than update cocoa pods gem because old cocoa pods will not download the new version of apollo pod. its weird.
- update Node because Apollo package needs it.
- etc and once you are done with all errors do pray for this library works.
Now using node v8.15.0 (npm v6.4.1) › Warning: apollo update available from 2.16.3 to 2.17.4. ++ npx --no-install apollo codegen:generate --target=swift '--includes=./**/*.graphql' --localSchemaFile=schema.json API.swift › Warning: apollo update available from 2.16.3 to 2.17.4. Loading Apollo Project [started] { Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined at Object.error (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/@oclif/errors/lib/index.js:22:17) at Generate.error (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/@oclif/command/lib/command.js:57:23) at OclifLoadingHandler.showError (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/apollo/lib/OclifLoadingHandler.js:28:22) at OclifLoadingHandler.handle (/Users/m.fai/Desktop/Projects/dumyname/MobileApps/dumyname-ios/node_modules/apollo/lib/OclifLoadingHandler.js:13:18) at <anonymous> oclif: { exit: 2 }, code: undefined } Loading Apollo Project [failed] → Error initializing Apollo GraphQL project "Unnamed Project": Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined › Error: Error initializing Apollo GraphQL project "Unnamed Project": Error: › Error in "Loading schema for Unnamed Project": TypeError: Cannot read › property 'reduce' of undefined Command /bin/sh failed with exit code 2I am so much frustrated due to lack of documentation of Apollo ios. it has been more than a week I am trying to use graphQL in my ios app. I resolve all errors but now stuck in this one and don't know the solution.
one thing which I have noticed in this project is lack of compatibility with old and different version os required libs.