Is there a reason the graphql dependency is still at 0.13.0? The latest version is 14.5.8, which seems crazy outdated but the first v14.0 release was cut in August 2018.
The library being so outdated is causing compilation problems for any new typescript project. It is impossible to get a new project up and running by just "npm install" 'ing the aws-appsync library.
If you would like a PR, please me know and I would be happy to put one together!
Note: Here are some of the compilation errors you will see in logs:
@project/library: node_modules/aws-appsync/node_modules/apollo-client/core/ObservableQuery.d.ts(1,30): error TS7016: Could not find a declaration file for module 'graphql'. 'node_modules/aws-appsync/node_modules/graphql/index.js' implicitly has an 'any' type.
@project/library: Try `npm install @types/graphql` if it exists or add a new declaration (.d.ts) file containing `declare module 'graphql';`
I'll also add that you can get around this issue by including the following in your tsconfig.json:
"compilerOptions": {
"skipLibCheck": true
...
I'd also note that the typescript support was released in August: https://github.com/graphql/graphql-js/releases/tag/v14.5.0
So it isn't completely egregious that aws-appsync isn't including the latest, but it is still a problem and I'm happy to help fix
Linking #482
In addition to looking at the graphql version, I also think for ease of typescript use it would help to make sure that all the needed base-types are also exported, in particularly NormalizedCacheObject
this seems to be still an issue with aws-appsync, had to go with "skipLibCheck": true option in the meantime. Hope it gets fixed soon.
Most helpful comment
Linking #482
In addition to looking at the graphql version, I also think for ease of typescript use it would help to make sure that all the needed base-types are also exported, in particularly NormalizedCacheObject