Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Add eslin+prettier & use rawCollection for the user lookup #82

Merged
merged 5 commits into from
Mar 8, 2017

Conversation

xavxyz
Copy link
Contributor

@xavxyz xavxyz commented Mar 1, 2017

This PR is about quality control & provide a consistent package (I hope!) along its future releases.

It sets up ESLint & prettier. So far so good, the package is still running & usable in a Meteor app but... it broke the tests with the dreaded Error: Can't wait without a fiber 😵 (screenshot).

➡️ Using directly the npm mongo driver with Meteors.users.rawCollection() solved this testing problem (and a Meteor app running with the package still receive data from the server):

const currentUser = await Meteor.users.rawCollection().findOne({
  'services.resume.loginTokens.hashedToken': hashedToken,
});

Fibers-aware queries sent to the server are handled thanks to apollographql/apollo-server#92

Thus I believe there is also no need for Meteor.bindEnvironment as we are not running anymore Fibers-aware code on the GraphQL server creation? 🤔 cc/ @stubailo @helfer

@xavxyz xavxyz merged commit 802a60d into master Mar 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant