Skip to content

Support graphql-ws protocol, breaks existing subscriptions-transport-ws protocol#805

Merged
nalchevanidze merged 38 commits intomorpheusgraphql:mainfrom
ropwareJB:main
May 11, 2023
Merged

Support graphql-ws protocol, breaks existing subscriptions-transport-ws protocol#805
nalchevanidze merged 38 commits intomorpheusgraphql:mainfrom
ropwareJB:main

Conversation

@ropwareJB
Copy link
Copy Markdown
Contributor

@ropwareJB ropwareJB commented Dec 21, 2022

  • Bump support to newer graphql-ws subscription protocol from deprecated
  • yesod example with node client using graphql-ws npm package.
  • Bump version to v0.28.0

This PR will cease support for the older protocol due to line, which changes the name of an event from 'data' to 'next':
https://github.com/morpheusgraphql/morpheus-graphql/pull/805/files#diff-d7568c77ceef4d42fcddd7e99c510f1d7d53592431ab6ff0027f1667b6de68deR160

Deprecation notice:
https://www.npmjs.com/package/graphql-ws#disclaimer

Graphql-ws protocol:
https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

Deprecated subscriptions-transport-ws protocol:
https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md

ropwareJB and others added 19 commits November 13, 2022 00:27
* publish-release/0.27.0

* cabal

Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: David Nalchevanidze <d.nalchevanidze@gmail.com>
* deriving on gql type

* lifted

* GQLType

* derive Type

* GQLType

* catName

* clean up

* update

* format
* deriveGQLType

* typeContent

* gql type

* fillTypeContent

* update

* insertType

* deriveFIelds

* inject type

* derive KindedType

* derive content

* mapping

* update

* derive content

* derive field arguments

* to Field Content

* derive field arguments

* update

* cant be input type
* clean up Deriving

* clean up deriving options

ignore undefined

GQLType

argumentsToObject

update

update

remove utils

GLQType

* fix subscription

* update useDerive schema

* useDeriveType

* fix schema deriving

* GQLType

* derive schema

* derive

* encode value

* derive app

* update Deriving named

* update encodeField

* kinded

* NamedFun

* named

* NamedResolvers

* resolver

* update

* build Map

* remove decode value

* update

* remove GQLType from Named Resolver

* update

* kindedProxy

* update

* optimize g traversable

* scan

* GTraversable

* scanner

* NamedResolvers

* flexible context
* kinded

* update

* update

* GMAP

* GTRaverse

* update

* omit visited

* fix types

* derive named resolvers

* update value

* scanner refs

* fun

* resolvers

* refs

* update

* update

* useGmap

* named resolvers

* NamedResolvers

* GQLResolver

* Grep

* GRep

* GRep

* GRep

* GRep

* TypeRep

* GRep

* Rep

* typeRep

* update

* format

* GMap

* fix Gmap

* MonadResolver

* class MonadResolver

* res

* monadResolver

* decodeValues

* clean up resolvers

* resolver

* ignoredResolver

* update

* update

* update

* monadResolver

* resolver

* MonadIOResolver

* MonadIOResolver

* Resolving

* MonadIO Resolver

* subscribe

* MonadResolver

* MonadResolver

* Update

* update

* format

* found

* MonadResolver

* runFun
* introspection

* MonadResolver

* MonadResolver

* Typeable

* MonadResolver

* MonadResolver

* lib sub

* runResolver

* NamedResolvers

* Resolver

* event

* update named

* Root

* update Resolvers

* schema api
@ropwareJB ropwareJB marked this pull request as ready for review December 21, 2022 10:13
@nalchevanidze
Copy link
Copy Markdown
Member

nalchevanidze commented Dec 22, 2022

thanks @ropwareJB. could you please remove Bumping of version to v0.28.0. since i use workflow which handles it automatically based on PR labels on deployment.

@nalchevanidze nalchevanidze added pr/breaking Breaking Change 📦 client Label for affected Package: "morpheus-graphql-client" pr/fix labels Dec 22, 2022
@nalchevanidze
Copy link
Copy Markdown
Member

examples:
- client
- code-gen
- code-gen-docs
- scotty
- scotty-fraxl
- scotty-haxl
- scotty-freer-simple
- servant

please add yesod-pubsub in the list. that way automatic config generation include it.

@ropwareJB ropwareJB changed the title Support graphql-ws protocol, Support graphql-ws protocol, breaks existing subscriptions-transport-ws protocol Dec 23, 2022
@nalchevanidze
Copy link
Copy Markdown
Member

@ropwareJB great work ;) i left some comments there. please run npm run setup 8.10.7 an the end to make sure the package and stack files have right configurations.

@nalchevanidze
Copy link
Copy Markdown
Member

@ropwareJB by the way if you could also add test cases for new graphql-ws protocol would be brilliant, however but not requirement :)

@ropwareJB
Copy link
Copy Markdown
Contributor Author

  • Fixed Test cases
  • Added Ping/Pong GQL Message types
  • Added Ping/Pong test case
  • Added WSOutputEvent ADT to capture WS DS updates + message back

@nalchevanidze nalchevanidze merged commit 1218c91 into morpheusgraphql:main May 11, 2023
@github-actions github-actions bot mentioned this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 client Label for affected Package: "morpheus-graphql-client" pr/breaking Breaking Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants