Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 9 #1484

Merged
merged 3 commits into from
Apr 11, 2020
Merged

Angular 9 #1484

merged 3 commits into from
Apr 11, 2020

Conversation

kamilkisiela
Copy link
Owner

@kamilkisiela kamilkisiela commented Mar 27, 2020

apollo-angular@next

apollo-angular-link-http@next
apollo-angular-link-http-batch@next
apollo-angular-link-http-common@next

apollo-angular-link-persisted@next
apollo-angular-boost@next
apollo-angular-link-headers@next

@kamilkisiela kamilkisiela linked an issue Mar 27, 2020 that may be closed by this pull request
Copy link

@flobacher flobacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a problem with ivy enabled?

I saw u explicitly disabled it...

@kamilkisiela
Copy link
Owner Author

kamilkisiela commented Mar 27, 2020

@flobacher

Doing:

"enableIvy": false

Means:
Hey Angular, I don't want to ship a bundle compiled with ngc (Angular Ivy Compiler).

Why:
Angular libraries should be shipped as normal and an Angular application should compile it locally with ngc. Take a look at Angular docs or their github or even do $ ng new demo and then $ ng g lib data and take a look at tsconfig.lib.prod.json.

It's not the first time I ship Angular 9 and Ivy. We use Angular 9 and Ivy in our big clients with current apollo-angular (v1.8.0) without any issues. All the Angular 8 libraries are compatible with Angular 9 and Ivy. I do this PR just because you guys want to have Angular 9 in peerDependencies, there's no problem with apollo-angular and ivy.

@flobacher
Copy link

Thanks for the explanation!

@kamilkisiela
Copy link
Owner Author

@flobacher did you test it?

@flobacher
Copy link

I also already use it without issue in an Angular 9 ivy project, and I trust your statement that you don't have any issues with it

@flobacher
Copy link

But i can test with this new version, to be sure..

@wSedlacek
Copy link

Version Tested:

    "apollo-angular": "1.9.0-alpha.0",
    "apollo-angular-link-http": "1.10.0-alpha.0",

Very nice to see all the install warnings go away.
At this time my use case is pretty simple. Just a standard query.
Everything seems to be working fine with that.
Are there any thing in particular we want to test with version 1.9.0? (Mutations, Caches, etc.)

Is there a roadmap for version 2.0?
I noticed there was a PR(#1380) and issue(#1383) for it but not any progress in a while.
What will it take to get that done and is there anything I can help with?

@kamilkisiela
Copy link
Owner Author

There are no changes in code, I just want to know if Angular Compiler does or does not scream :)

About the progress. Once the @apollo/client become stable, we will get a stable apollo-angular. I don't update anything in the PR because there's no point now.

@wSedlacek
Copy link

Awesome! That's what I wanted to know!

I will test the alpha versions some more with mutations etc. and keep you posted if any errors come up. So far everything works the same as on v1.8.0 for me.

@flobacher
Copy link

flobacher commented Apr 3, 2020

@kamilkisiela I included apollo-angular-link-http@next and apollo-angular@next in our project and experienced no issues, neither at build nor at runtime

@celvin
Copy link

celvin commented Apr 10, 2020

I've upgraded apollo-angular to next and also graphql to ^15.0.0 and started to emit this error:

`ERROR in node_modules/apollo-client/core/watchQueryOptions.d.ts:56:32 - error TS2315: Type 'ExecutionResult' is not generic.

56 refetchQueries?: ((result: ExecutionResult) => RefetchQueryDescription) | RefetchQueryDescription;
~~~~~~~~~~~~~~~~~~
node_modules/apollo-client/core/LocalState.d.ts:40:23 - error TS2315: Type 'ExecutionResult' is not generic.

40 remoteResult: ExecutionResult;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/apollo-client/core/LocalState.d.ts:44:17 - error TS2315: Type 'ExecutionResult' is not generic.

44 }): Promise<ExecutionResult>;
~~~~~~~~~~~~~~~~~~~~~`

@kamilkisiela
Copy link
Owner Author

@celvin those are related to apollo-client and probably apollo-link (which I fixed), nothing really I can do in apollo-angular. My library supports GraphQL v15.

@kamilkisiela kamilkisiela merged commit 9099f9e into master Apr 11, 2020
@kamilkisiela kamilkisiela deleted the feat/angular-9 branch April 11, 2020 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular v9.0 Support
4 participants