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

GraphQL Support? #149

Closed
kwcto opened this issue Oct 15, 2015 · 12 comments
Closed

GraphQL Support? #149

kwcto opened this issue Oct 15, 2015 · 12 comments
Milestone

Comments

@kwcto
Copy link

kwcto commented Oct 15, 2015

I'm still learning GraphQL (https://learngraphql.com) but my first impression is that the support for multiple/batched reads/writes and "selectable" schema would be powerful when combined with the rest of the feathers workflow. Thoughts?

@daffl
Copy link
Member

daffl commented Oct 15, 2015

I read the introductory post a while ago and just scrolled through the GraphQL spec and I think it makes sense to explore this option a little more.

Currently Feathers supports query batching through feathers-batch and all 1.0 db adapters support field querying through the $select special query param (see e.g. here for feathers-nedb). We are also working on nested services in feathers-associations and schemas can be easily implemented via feathers-hooks.

It seems like those are doing a lot of the things that - at least from what I understand - GraphQL covers as well. It almost looks as if a GraphQL adapter would just consolidate all those separate features into a unified interface (the full spec looks like a bit to work through ;).

Once you learned a little more maybe you can help answer some of the questions that came to my mind:

  • How does the Feathers service model tie into GraphQL?
  • Can the existing plugins be combined to provide this functionality?
  • What is missing?
  • Where are the potential implementation challenges?
  • What's the deal with https://github.com/graphql/graphql-js? I don't see any tests and if it is a reference client implementation I am not sure how you can verify that you built a server that implements the spec.

@daffl
Copy link
Member

daffl commented Oct 15, 2015

Also, besides the current real-time events (which might potentially be hard to correlate with your GraphQL query results), could we have such thing as real-time GraphQL queries? How could that look like?

@daffl daffl added this to the 1.2.0 milestone Nov 17, 2015
@daffl
Copy link
Member

daffl commented Nov 17, 2015

In fact, this may be solved with adding support for Waterline because we can just use https://github.com/wistityhq/waterline-graphql. /cc @ekryski

@kwcto
Copy link
Author

kwcto commented Nov 17, 2015

Haven't had a chance to experiment with GraphQL much more but I'm glad there may be a simple way to add support. Makes evangelizing Feathers that much easier 👍

@ekryski
Copy link
Contributor

ekryski commented Nov 25, 2015

We're making some progress here. Once https://github.com/feathersjs/feathers-waterline is complete (still in the works) you will be able to use https://github.com/wistityhq/waterline-graphql and should make using graphql rather trivial.

We'll probably just need to document an example.

@daffl daffl removed this from the 1.2.0 milestone Dec 16, 2015
@daffl daffl added this to the 2.0.0 milestone Dec 26, 2015
@daffl
Copy link
Member

daffl commented Dec 26, 2015

The first version of feathers-waterline has been published which should allow using the Waterline GraphQL module. I haven't tested it yet but if there are any issues with the integration it can be reported in the Waterline adapter.

@daffl daffl closed this as completed Dec 26, 2015
@ekryski
Copy link
Contributor

ekryski commented Oct 31, 2016

Thanks for adding that @andrejunges! ^ that is the recommended way so far. I believe the repo is a bit more up to date. https://github.com/swarthout/feathers-apollo

@subodhpareek18
Copy link

subodhpareek18 commented Feb 1, 2017

How about being able to use other middlewares? something like this is pretty great. https://github.com/calebmer/postgraphql

Though as the name suggests it only works with postgres.

I'm pretty new to feathers, but would love to be able to write a feathers-postgraphql service for a middleware like this if possible.

Also wondering if there is an easy way to convert a regular ol express middleware into a service. Express middlewares work fine with feathers, but they obviously don't register as other feathers-services.

@thelaith
Copy link

thelaith commented Feb 9, 2018

Status on @subodhpareek18 suggestion - would love to know if a decision has been made, since it's been a year.

@eddyystop
Copy link
Contributor

eddyystop commented Feb 9, 2018

One option is the docs for a graphql adapter will be available within a month. A repo to help generate resolvers will be available the month after that.

@lock
Copy link

lock bot commented Feb 7, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants