nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
146 stars 37 forks source link

GraphQL error: Schema is not configured for mutations #61

Closed ilan-schemoul closed 7 years ago

ilan-schemoul commented 7 years ago

Hello, when I loginWithPassword({ email, password }, apolloClient) it returns the error GraphQL error: Schema is not configured for mutations. Yet I've ofc did initAccounts(); then loaded with loadSchema the schema and the resolvers, that you can see here :

// schema
[`
  type User {
    _id: Int
    name: String
    emails: [Email]
    password: String
    admin: Boolean
  }

  type Email {
    address: String
    verified: Boolean
  }
`];
// resolvers 
{
  Query: {
    users(_, args) {
      return User.findAll({ where: args });
    },
  },
};

Your package seems good but is very widely undocumented unfortunately. And obviously after all that I've makeExecutableSchema and created the apollo server with the function createApolloServer.

ilan-schemoul commented 7 years ago

I don't understand what's wrong. Here are defined mutations of this package and here these mutations are loaded. I really really need your help.

ilan-schemoul commented 7 years ago

Oh okay I forgot to put into my schema {} mutation: Mutation