Comments (14)
Can you run the update branch of my demo app?
from meteor-apollo-accounts.
Before the update (works): https://github.com/janikvonrotz/meteor-apollo-accounts-example
And the branch after the update (fails): https://github.com/janikvonrotz/meteor-apollo-accounts-example/tree/update
from meteor-apollo-accounts.
Thanks for the update, however, it's not working for me yet:
Error: Mutation.createUser defined in resolvers, but not in schema
from meteor-apollo-accounts.
Remember that you have to install accounts-password
from meteor-apollo-accounts.
I did so. It seems that the hasService('password')
check is not working for me. Could you run the the demo app from update branch and tell me if it works for you?
If I run this code server-side:
const Package = global.Package
console.log(!!Package['accounts-password'], Package['accounts-password'])
I'll get this output:
true {}
So I'm not sure why it fails to load the right graphql mutations.
from meteor-apollo-accounts.
Is the second gql tag necessary? It probably works without.
export default gql`
${
hasService('password') ? gql`...
from meteor-apollo-accounts.
The tag doesn't do nothing, it's just for syntax highlighting on my editor.
What error are you having?
from meteor-apollo-accounts.
This mutations are not available:
# Log the user in with a password.
loginWithPassword (username: String, email: String, password: HashedPassword, plainPassword: String): LoginMethodResponse
# Create a new user.
createUser (username: String, email: String, password: HashedPassword!): LoginMethodResponse
# Change the current user's password. Must be logged in.
changePassword (oldPassword: HashedPassword!, newPassword: HashedPassword!): SuccessResponse
# Request a forgot password email.
forgotPassword (email: String!): SuccessResponse
# Reset the password for a user using a token received in email. Logs the user in afterwards.
resetPassword (newPassword: HashedPassword!, token: String!): LoginMethodResponse
And I think its because of this:
export default gql`
${
hasService('password') ? >>gql<<`
# Log the user in with a password.
Maybe it works without the graphql tag:
export default gql`
${
hasService('password') ? `
# Log the user in with a password.
from meteor-apollo-accounts.
Mmm I don't think it's the graphql tag, it works in my code. I believe that hasService('password')
is returning false to you, but why? 🤔
from meteor-apollo-accounts.
I did a test: janikvonrotz/meteor-apollo-accounts-example@53aa06c
I've added the mutations from your packages directly into my schema. It only works without the gql
tags. The plain text schema is taken as parameter for makeExecutableSchema
. So it is not necessary to parse the graphql schema definitions with the gql tag.
I suppose you remove the gql
tag in your schema definitions. This would also work according to the apollo documentation: http://dev.apollodata.com/tools/graphql-tools/generate-schema.html
Please let me know if this works for you.
from meteor-apollo-accounts.
This is the gql tag I'm using https://github.com/nicolaslopezj/meteor-apollo-accounts/blob/master/apollo-accounts/src/gql.js, not the package "graphql-tag". It doesn't do anything.
The error must be somewhere else 🤔
from meteor-apollo-accounts.
But why use a parser at all?
from meteor-apollo-accounts.
Now it's fixed, just by adding accounts-password to the weak dependencies of this package.
from meteor-apollo-accounts.
Thanks a lot for testing and making the example
from meteor-apollo-accounts.
Related Issues (20)
- Remove dependency on graphql-loader HOT 4
- Accessing userId in graphql server context HOT 1
- GraphQL error: Unknown type "HashedPassword"
- Server-side Rendering & Access to user's ID
- Huge delay between when you call loginWithPassword and user object becomes available in context? react-native + apollo 2.0 HOT 1
- Disable Mutation createUser HOT 3
- Has anyone used Accounts.onCreateUser with meteor-apollo-accounts?
- RN: Crash on Android when trying to loginWithFacebook HOT 1
- Use loginWithPassword with hashPassword
- onChangeCallbacks error HOT 2
- `initAccounts` not exported from meteor/nicolaslopezj:apollo-accounts? HOT 1
- Enrollment user flow
- Float cannot represent non numeric value: {} HOT 7
- User Authentication in metoer with mysql
- Possible to not expose createUser to client? HOT 1
- Setup instructions with apollo-boost? HOT 1
- move devDependencies into devDependencies
- Checking if login token is valid HOT 2
- Looking for a mantainer HOT 3
- Client side package . How to set the fields for returning ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-apollo-accounts.