What is your current query causing the error <@UL7...
# orm-help
w
What is your current query causing the error @Mike SOK?
m
@Warren Day it is my mutationthat is thrown the error:
Copy code
async createRating(parent, {ratingSubject, ratingDescription, ratingImage, ratingStar, itemId}, ctx, info) {

		const hasPermissions = ctx.request.user.permissions.some
	    (permission =>
	      ['ADMIN', 'USER'].includes(permission)
	    );

	    if (!hasPermissions) {
	      throw new Error("You don't have permission to do that!");

	    }

		if (!ctx.request.userId) {
			throw new Error ('You must be logged in to do that!');
		}

		const rating = await ctx.db.mutation.createRating({

			data: {
				// This is how we create a relationship between the Item and the User
				user: {
					connect: {
						id: ctx.request.userId
					}
				},

				item: {
					connect: { id: itemId }
				},
				ratingSubject,
				ratingDescription,
				ratingImage,
				ratingStar,
			},
		}, 

		info);

		return rating;
	},
this line seems to be the problem but it is not making any sense?
Copy code
item: {
					connect: { id: itemId }
				},
w
Sorry Mike I assumed it was an error from the query, but here you are making a mutation and have no "where" prop as the error mentioned.