Coder Social home page Coder Social logo

feathers-apollo's People

Contributors

solon avatar swarthout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feathers-apollo's Issues

Failed at the [email protected] start script 'babel-node src

npm-debug.log.txt

I'm getting errors at startup indicating:

npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'babel-node src/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the feathers-apollo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node src/

I'm just trying to run the repo code...

graphql queries

I don't see you using graphql queries. Feathers is limited to only few services such as create, setup, patch ...etc. Don't that limit the graphql usage?

Expected Iterable, but did not find one for field RootQuery.posts

Hi!

First: THANKS! Its an amazing approach!
But i ran into some Problems:

{posts(category:TECHNOLOGY) {
  _id
  title
  category
  summary
  content
  createdAt
}}

Result:

{
  "data": {
    "posts": null
  },
  "errors": [
    {
      "message": "Expected Iterable, but did not find one for field RootQuery.posts.",
      "locations": [
        {
          "line": 1,
          "column": 2
        }
      ]
    }
  ]
}

So it seems Apollo can not handle our result Object {total: 3, limit:0, data: [ ...

If i modify the resolver to only return the data Array it works:

      posts(root, {category}, context) {
        return Posts
          .find({query: { category }})
          .then(d => d.data);
      },

But the total, limit and skip Params are important to know about the data.

Edit

I used NeDB Data and not your mongoose models. Seems mongoose returns the plain array which works.

passing authorization token

how do you pass authorization token to graphql queries (like viewer query), once you are logged in? If this could be mentioned in the readme it would be awesome.

Error on start, MONGO ???

mongoClient.then(db => {
^

TypeError: Cannot read property 'then' of undefined
at Function.module.exports (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/src/services/users/users.service.js:18:14)
at Function.configure (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/node_modules/feathers/lib/application.js:138:8)
at Function.module.exports (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/src/services/index.js:5:7)
at Function.configure (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/node_modules/feathers/lib/application.js:138:8)
at Object. (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/src/app.js:50:5)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/sturner/sightuary/groups/works+labs/dd/MochaProjects/Javascript/ES6/blog-experience-mtt/src/index.js:3:13)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)

Socket.io example?

Great work. Is this repo still up to date?

<<Automatic Socket.io integration (way to use websockets for real-time features before Apollo's solution is completed)>>

Apollo has GQL Subscriptions now but they need better documentation and further refinements. In the meantime, I'd like to try out Feather's socket.io solution. I went thru the tutorial in the docs folder and it seems that everything is setup as REST. Is there a Socket.io example or can you please add one?

Outdated

Hello there and sorry about the title ... but it's the case.

I'm learning this new technology for me and I followed the blog post here :

https://halcyon-labs.github.io/blog/2016/07/13/eagle-has-landed/

and had a look on that one too inspired by the first one :

https://medium.com/fuzz/the-electric-feathersjs-and-apollo-server-the-start-f338a744b34b

... and the cli started to ask me more question than exposed on the blog post, or is partially different. I managed this; but just after, the tutorial asks to call the generate service command where it is said to chose the generate option (which no more exists) and I have replaced by chosing "A custom service". But after it is said to edit file :

src/services/graphql/index.js

and nothing longer here, I have a src/services/index.js that list the existing services and instead I have a graphql.class.js which is completely different than the showed file in tutorial (class now in it, ES2015 synthax).

I'm some kind of "blocked" now and a lot sad.

Would someone be ready to give an update to this tutorial ?

Thanks anyway.

Feathers Auk update

Hi, I was wondering if you could please update the example to work with the latest version of FeathersJS and maybe add a frontend built on top of this starter kit, that would be super helpful.

Thanks in advance for your help

Pre-processing hooks: can they be used for validation?

With Feathers, it looks like we can have pre-processing hooks for mutations? If so, can they be used for validating user input on the server (and avoiding duplication of logic on client?) In that case, if the data is invalid, can the mutation be avoided/ignored?

p.s. there is a lot of stuff that could be added to this great demo (custom events, socket.io, validation, etc) to explore all the features that Feathers brings to GQL. I hope to be able to contribute, but currently trying to understand what is possible out of the box.

Thanks once again!

feathers-client example

It would be great if you would offer some examples for the feathers-client.
For example how would you send an GraphQL Query from a feathers-client.

How would you send the query for example through a socket, which you opened through the feathers-client. Currently it is only possible as normal HTTP request.

I am not speaking of Subscriptions. I just want to send the query through the already open socket instead of a normal HTTP POST.

Thanks!

Passing in token via GraphiQL

So I got as far as getting an auth token after login. But when I create a post via GraphiQL, how do I pass in that token?

Some minor errors and other comments

I found some minor errors in your code.
Obviously in resolvers.js createPost should return Posts.create(args, context) instead of Users,create.
In your schema the input for createPost is a postInput object. This doesn't work. Instead I provide title, content, summary and category as separate input arguments.

I think it is better to login using the standard login function of Feathers. In that case your auth.js module in services/graphql/lib is not needed. In this module you do a low level password check. Using standard Feathers login means that you only need to post username and password to the endpoint auth/local. For this I use Postman.
To make this possible it is necessary to add an entry "usernameField": "username" to the auth options in config/default.json. Without this Feathers expects "email" as the field for the user name.
With these modifications I built your project from scratch and uploaded it to my own github repository, https://github.com/advanwinkel/feathers-apollo-SQLite. I also made modifications in order to use SQLite as backing database, which is rather easy to achieve with Feathers.

In order to pass the web token for the mutations I post graphql queries in Postman to endpoint graphql. The web token goes into the Authorization header.

I was happy to see that you used Feathers as your framework. I think this is a very clean and elegant back end framework, which is very helpful to construct web services including authentication.

Pure "client only" version of Feathers-Apollo

I have played with this architecture. It is pretty cool, and makes a lot of sense to me, but I have been wondering why we have GraphQL sitting in the mid-tier, and why have a mid-tier at all when we can have GraphQL Anywhere (with async resolver support) sitting in the client and interacting with Feathers services running in the client that in turn wrap external resources. Why the mid tier?

Update to new version of apollo

Hi, are you going to update to the new version of apollo server?

It would be cool to make a screencast and update the blog post.

thanks..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.