aruntk / polymer-apollo

🚀 Polymer Apollo Integration
MIT License
78 stars 7 forks source link

Publish on https://webcomponents.org #21

Open FluorescentHallucinogen opened 6 years ago

FluorescentHallucinogen commented 6 years ago

IMO, polymer-apollo should be a Polymer web component (or set of Polymer web components), i.e. HTML files.

FluorescentHallucinogen commented 6 years ago

If I understand correctly, polymer-apollo is a mixin (what is called behavior in Polymer 1.x) that helps access apollo-client instance in other Polymer web components.

I mean that behaviors (for Polymer 1.x), or mixins (for Polymer 2.x and Polymer 3.x) can be declared in the web components (in HTML file for Polymer 1.x and Polymer 2.x and published to Bower or in JS file for Polymer 3.x and published to NPM). See e.g. https://webcomponents.org/search/behavior.

See also https://webcomponents.org/element/reach-digital/polymer-apollo-client. This is a collection of <graphql-client>, <graphql-mutation> and <graphql-query> Polymer web components. It is very easy and intuitive to use it, but I don't know how flexible this design for complex scenarios. BTW, polymer-apollo-client doesn't support subscriptions.

@aruntk What do you think?

FluorescentHallucinogen commented 6 years ago

@paales @rjspotter What about to join efforts and work together on one single project? :wink:

aruntk commented 6 years ago

What about to join efforts and work together on one single project

@FluorescentHallucinogen Sure. :)

FluorescentHallucinogen commented 6 years ago

@aruntk What about my suggestions?

rjspotter commented 6 years ago

@FluorescentHallucinogen I'm happy to help out however I can. FWIW I chose to use polymer-apollo-client because the component model was easier to wrap my head around and integrate into a basic starter-kit (I'm primarily a Backend Dev)

aruntk commented 6 years ago

@FluorescentHallucinogen I've sent you a collaborator invitation. I'm a bit busy now-a-days. It'd be great if you could contribute. :)

FluorescentHallucinogen commented 6 years ago

I've also found https://github.com/atoy40/kapton by @atoy40 and https://github.com/matteo-hertel/polymer-graphql by @matteo-hertel.

paales commented 6 years ago

Also https://www.npmjs.com/package/lit-apollo

FluorescentHallucinogen commented 6 years ago

@paales lit-apollo is great project, but it does not provide web components per se, this is base classes which authors are meant to extend. See https://github.com/bennypowers/lit-apollo/issues/2 for more info.