Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL error: Schema is not configured for mutations #61

Closed
ilan-schemoul opened this issue May 25, 2017 · 2 comments
Closed

GraphQL error: Schema is not configured for mutations #61

ilan-schemoul opened this issue May 25, 2017 · 2 comments

Comments

@ilan-schemoul
Copy link

ilan-schemoul commented May 25, 2017

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
Copy link
Author

ilan-schemoul commented May 25, 2017

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant