accounts-js/graphql

Looking for contributors

TimMikeladze opened this issue · 4 comments

Would be great to have some contributions to this repo.

Some thoughts on design

This repo is split up into 4 packages akin to https://github.com/js-accounts/rest, @accounts/graphql, @accounts/graphql-express, @accounts/graphql-hapi, @accounts/graphql-koa.

The @accounts/graphql package should implement the Transport interface https://github.com/js-accounts/accounts/blob/master/packages/client/src/TransportInterface.js and call the relevant mutations. The apollo client should have middleware to do token validation and refreshes.

Would be nice to allow a user to provide their in app instance of the apollo client.

The schema can be defined in the @accounts/graphql package as well.

The other server side packages should provide the necessary middleware for each server and optionally standup an instance of the server consuming the middleware, this could be useful in the case when you want to create an authentication microservice without writing extra code.

I have a suspicion that the bulk of the server code could be extracted and shared with https://github.com/js-accounts/rest.

Yep for sure. Starting next week probably I will begin writing a small integration package and example for meteor that will declare our accounts package as meteor methods with the same API method names as meteor's accounts package.
My wish for that is to take a meteor project, remove current accounts package and import this suite without having to do anything else.

After that I think this repo will go up in my priority list as I have a couple of projects on the line that should use that.
I'll try to keep you posted and I hope that if anyone sees this issue (before I get to that) she/he will hop onboard and help with it.

@davidyaha
Let's talk about it:)
I did most of the work under apollo-passport-local I think I can take this code into this repo as well.

Released version 0.1.0 with full functionality and some breaking changes on loginWithPassword input types