Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Adds Support for Graphql ^0.11.0 #261

Merged
merged 7 commits into from
Sep 13, 2017
Merged

Conversation

DxCx
Copy link
Contributor

@DxCx DxCx commented Aug 30, 2017

This PR adds support for GraphQL ^0.11.0
^0.10.0 will still work.

BREAKING CHANGE: Remove support for SubscriptionManager
Related to:
apollographql/graphql-subscriptions#104

TODO:

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change

Closes #259

@edvinerikson
Copy link

What's the status of this? No one able to review it? @DxCx

@DxCx
Copy link
Contributor Author

DxCx commented Sep 7, 2017

@edvinerikson there is still issue with graphql-subscriptions which apollo team needs to decided either remove from dependancies or upgrade as well..
also, as you can see there are older PRs which havn't been reviewed as well.. im waiting as well..

@edvinerikson
Copy link

Alright, I see. Do you know what the dependency is inside of graphql-subscriptions?

I pinged @stubailo on Slack with the link to my PR and mentioned the low activity. I have not get any reply yet though (20min ago or something).

I really need this change because of the async subscribe function.

@DxCx
Copy link
Contributor Author

DxCx commented Sep 7, 2017

only subscription manager interface which i think needs to be just moved inside this package until deprecated or just be deprecated as soon as possible.
but there is no reason of graphql-subscriptions to be a dependancy here.

@edvinerikson
Copy link

I agree. I just migrated away from it when I upgraded. Not sure in which version it got deprecated but making a major bump and removing it shouldn't be too hard(?).

@stubailo
Copy link
Contributor

stubailo commented Sep 7, 2017

I think @NeoPhi will also take a look soon, let's try to get some next steps before the end of the week.

@zackify
Copy link

zackify commented Sep 8, 2017

@stubailo anything I can do to help get this out quicker? I was stuck for a long time today until finding this haha

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 8, 2017

I'm in favor of merging this in and having the needed changes to graphql-subscriptions made. There has been a lot of confusion about the deprecation warning so adding 0.11 support as part of a version bump on this project and the other one feels like the right next steps.

@edvinerikson
Copy link

edvinerikson commented Sep 8, 2017 via email

@DxCx
Copy link
Contributor Author

DxCx commented Sep 8, 2017

@NeoPhi whats the reason for wanting to keep this as a dependnacy?
It was called deprecated ~4 month ago...

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 8, 2017

@DxCx Sorry if my comment was unclear. I'm not advocating that graphql-subscriptions be kept as a dependency. Instead I'm saying that if we remove the dependency here we should also update graphql-subscriptions to remove the deprecated SubscriptionManager to avoid any confusion.

@DxCx
Copy link
Contributor Author

DxCx commented Sep 8, 2017

Oh, that is absolutely correct. :)

@DxCx DxCx changed the title Adds Support for Graphql ^0.11.0 [DO NOT MERGE] Adds Support for Graphql ^0.11.0 Sep 12, 2017
@DxCx
Copy link
Contributor Author

DxCx commented Sep 12, 2017

will need a new version of graphql-subscriptions so CI won't fail on node 4
but accept for that it looks ready for review to me.

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 12, 2017

@DxCx graphql-subscriptions v0.5.0 has been released.

package.json Outdated
"@types/lodash": "^4.14.68",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.8",
"@types/sinon": "^2.3.0",
"@types/ws": "^3.0.0",
"chai": "^4.0.2",
"graphql": "^0.10.1",
"graphql": "^0.11.3",
"graphql-subscriptions": "^0.4.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

@DxCx update to latest :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i was working at that since there was a typing still depended.. now it's pushed =)

@@ -1,110 +0,0 @@
import { SubscriptionManager } from 'graphql-subscriptions';
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

@dotansimha
Copy link
Contributor

@DxCx looks great. just need to update graphql-subscriptions version and fix CI issue.
Back then we talked about "V1" of the transport, and the goal was to remove the support for the old code.
If we removed the SubscriptionManager support, do you think we need to remove the support for the older protocol as well? @DxCx @Urigo

@DxCx
Copy link
Contributor Author

DxCx commented Sep 13, 2017

we don't need to remove it but i think we can remove all deprecated code..
we can do it now or next step will be to clean them up and release graphql-transport-ws

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 13, 2017

As this is a breaking change release, I'd be in favor of removing the deprecated code.
I think removal of the old protocol should be part of the switch to graphql-transport-ws as @mistic has thoughts on that.

@DxCx
Copy link
Contributor Author

DxCx commented Sep 13, 2017

so do we want to remove all the legacy API and keep the protocol legacy layer for the time being?
(until graphql-transport-ws)

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 13, 2017

That would be my recommendation.

@DxCx
Copy link
Contributor Author

DxCx commented Sep 13, 2017

@stubailo @Urigo @mistic @dotansimha @martijnwalraven would be great to get some advice in here..

@stubailo
Copy link
Contributor

I agree with both of you! Let's go ahead and do it.

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 13, 2017

@DxCx Do you have a preference on next steps? My thinking is that the changes to remove the deprecated API are simple and mirror what is happening with the removal of SubscriptionManager. We can then do a breaking change release of subscriptions-transport-ws that gets this package working with 0.11.x. Then as part of the switch to the new package name the old protocol can be removed.

@DxCx
Copy link
Contributor Author

DxCx commented Sep 13, 2017 via email

@NeoPhi NeoPhi merged commit 71dde80 into apollographql:master Sep 13, 2017
@DxCx DxCx deleted the gql-0.11.1 branch September 14, 2017 06:44
@mistic
Copy link
Contributor

mistic commented Sep 14, 2017

@DxCx @NeoPhi I agree with you! In my opinion we should release now a breaking change version without the SubscriptionsManager and the legacy protocol support. And that should be the last subscriptions-transport-ws release. Next we should release a new package called graphql-transport-ws. What do u think about this?

@stubailo
Copy link
Contributor

Hmm, why not release the breaking change as the new package right away?

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 14, 2017

I think releasing the new package with Apollo 2 support would make it easier for people to understanding the breaking protocol changes.

@mistic
Copy link
Contributor

mistic commented Sep 14, 2017

Both ways are valid. However I think that releasing the breaking changes (of things already marked as deprecated for 4 months) in the subscriptions-transport-ws as it very last released version can help people to instant migrate to the new package with 0 effort. What do u think @stubailo @NeoPhi @DxCx @dotansimha @Urigo ?

@DxCx
Copy link
Contributor Author

DxCx commented Sep 14, 2017

@NeoPhi
this package is already supported by apollo-link-ws and works with apollo-client 2 🎉

@mistic
IMO we should release the cleaned api version (Other PR merged)
and right after rename package and release again with just rename,
then from there removing the legacy protocol support and total cleanup.

after that we can continue "grow" the new graphql-transport-ws package.

@mistic
Copy link
Contributor

mistic commented Sep 14, 2017

@DxCx wasn't this the same I suggest? :D

In order to allow everyone understand and no doubts remaining what we are suggesting is:

  • Release the 0.9.0 version of subscriptions-transport-ws with the cleaned api, the legacy protocol and without the SubscriptionsManager
  • Rename the repository (so we can keep the stars and all the other history) and all the documentation for the new graphql-transport-ws.
  • Clean the old protocol support, update again the documentation and release the first 0.0.1 version of the graphql-transport-ws deprecating the old npm subscriptions-transport-ws package with a message to use the new one instead.

What do u think @DxCx @NeoPhi @dotansimha ?

@DxCx
Copy link
Contributor Author

DxCx commented Sep 14, 2017

Agreed.
I just think initial version can be 0.1.0

@mistic
Copy link
Contributor

mistic commented Sep 14, 2017

yeah @DxCx it can be 👍

As soon as the others write their thoughts I can proceed with the agreed changes 😄

@NeoPhi
Copy link
Contributor

NeoPhi commented Sep 14, 2017

@mistic Sounds good. Let me know if you'd like me to handle any of that.

@morajabi
Copy link

Whatever are you doing, please add some notes or guides to upgrade... I wasted a few hours because there's a lot of conflict between documentation of Apollo and this package. Thank you for the great work here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants