I define a graphql mutation. like this;
const DB = {
Vehicles: {
create({companyId, plate, imei}) {
const vehicle = {plate, imei, companyId};
return Vehicles.insert(vehicle);
}
}
}
const Mutation = new GraphQLObjectType({
name: 'VehicleMutations',
description: 'Mutations of vehicles',
fields: {
newVehicle: {
type: Vehicle,
args: {
companyId: {type: new GraphQLNonNull(GraphQLString)},
plate: {type: new GraphQLNonNull(GraphQLString)},
imei: {type: new GraphQLNonNull(GraphQLString)}
},
resolve: (root, args) => {
return DB.Vehicles.create(args);
}
}
}
});
when write this mutation in graphql ide, I am getting the following error;
{ data: { newVehicle: null },
errors: [ { [Error: Can't wait without a fiber] originalError: [Error: Can't wait without a fiber] } ] }
I looked https://github.com/kadira-samples/meteor-graphql-demo and https://github.com/kadira-samples/meteor-graphql-todos repos