aws-samples / aws-mobile-appsync-chat-starter-angular

GraphQL starter progressive web application (PWA) with Realtime and Offline functionality using AWS AppSync
https://aws.amazon.com/appsync/
Apache License 2.0
518 stars 161 forks source link

Upgrade to Angular 6 #28

Closed jovermier closed 5 years ago

jovermier commented 6 years ago

It would be very helpful if this used Angular 6.

onlybakam commented 6 years ago

Please checkout the angular6 branch! Let us know if you run into any issues.

hisham commented 6 years ago

I am getting the following in angular6 branch:

ERROR in src/app/chat-app/chat-convo-list/chat-convo-list.component.ts(47,13): error TS2322: Type 'import("/Users/hisham/src/aws-mobile-appsync-chat-starter-angular/node_modules/aws-appsync/node_m...' is not assignable to type 'import("/Users/hisham/src/aws-mobile-appsync-chat-starter-angular/node_modules/apollo-client/core...'. Types have separate declarations of a private property 'isCurrentlyPolling'. src/app/chat-app/chat-message-view/chat-message-view.component.ts(106,9): error TS2345: Argument of type '{ query: any; fetchPolicy: string; variables: { conversationId: any; first: number; }; }' is not assignable to parameter of type 'WatchQueryOptions<{ conversationId: any; first: number; }>'. Types of property 'fetchPolicy' are incompatible. Type 'string' is not assignable to type 'FetchPolicy'. src/app/chat-app/chat-user-list/chat-user-list.component.ts(53,29): error TS2339: Property 'allUser' does not exist on type '{}'. src/app/chat-app/chat-user-list/chat-user-list.component.ts(60,68): error TS2459: Type '{}' has no property 'subscribeToNewUsers' and no string index signature. src/app/chat-app/chat/chat.component.ts(99,28): error TS2339: Property 'me' does not exist on type '{}'. src/app/nav/nav.component.ts(21,7): error TS2322: Type 'string' is not assignable to type 'boolean'.

jovermier commented 6 years ago

I am also getting the error when running awsmobile run on ubuntu:

ERROR in src/app/chat-app/chat-convo-list/chat-convo-list.component.ts(47,13): error TS2719: Type 'import("/home/user/Documents/aws-chat/aws-mobile-appsync-chat-starter-angular/node_modules/a...' is not assignable to type 'import("/home/user/Documents/aws-chat/aws-mobile-appsync-chat-starter-angular/node_modules/a...'. Two different types with this name exist, but they are unrelated.
  Types have separate declarations of a private property 'isCurrentlyPolling'.
src/app/chat-app/chat-message-view/chat-message-view.component.ts(106,9): error TS2345: Argument of type '{ query: any; fetchPolicy: string; variables: { conversationId: any; first: number; }; }' is not assignable to parameter of type 'WatchQueryOptions<{ conversationId: any; first: number; }>'.
  Types of property 'fetchPolicy' are incompatible.
    Type 'string' is not assignable to type 'FetchPolicy'.
src/app/chat-app/chat-user-list/chat-user-list.component.ts(53,29): error TS2339: Property 'allUser' does not exist on type '{}'.
src/app/chat-app/chat-user-list/chat-user-list.component.ts(60,68): error TS2459: Type '{}' has no property 'subscribeToNewUsers' and no string index signature.
src/app/chat-app/chat/chat.component.ts(99,28): error TS2339: Property 'me' does not exist on type '{}'.
src/app/nav/nav.component.ts(21,7): error TS2322: Type 'string' is not assignable to type 'boolean'.
lennybr commented 6 years ago

I'm also getting errors when trying the angular6 branch from scratch, would be great to have a working Angular 6 example.

KoldBrewEd commented 5 years ago

Sorry, we haven't had much time to work on the upgrade to Angular 6 as there are lots of breaking changes apparently. We don't have a working version with Angular 6 yet and realistically we'll only be able to look at it some time after re:Invent.

In the mean time, feel free to fork and give a try on the upgrade process. Any help with it would be very appreciated.

KoldBrewEd commented 5 years ago

Started to work on Angular 7: https://github.com/aws-samples/aws-mobile-appsync-chat-starter-angular/tree/angular7

KoldBrewEd commented 5 years ago

Now running on Angular 7: https://github.com/aws-samples/aws-mobile-appsync-chat-starter-angular/pull/36