I’m not sure why I am receiving the following erro...
# orm-help
j
I’m not sure why I am receiving the following error:
Error: The type of Mutation.signup(data:) must be Input Type but got: SignupInput!.
I’ve defined the type in my schema.graphql:
Copy code
# import * from './generated/prisma-client/prisma.graphql'

type SuccessMessage {
  message: String
}

type Mutation {
  createProperty(title: String, url: String): Property!
  signup(data: SignupInput!): AuthPayload!
  signin(email: String!, password: String!): AuthPayload!
  signout: SuccessMessage
  requestPasswordReset(email: String!): SuccessMessage
  resetPassword(resetToken: String!, password: String!, passwordConfirmation: String!): User!
  confirmEmail(email: String!, emailConfirmToken: String!): AuthPayload!
}

type AuthPayload {
  token: String!
  user: User!
}

type Query {
  properties: [Property]!
  currentUser: User
}

type SignupInput {
  name: String
  email: String!
  password: String!
}

type User {
  id: ID!
  name: String!
  email: String!
  emailConfirmed: Boolean!
  permissions: [Permission!]!
}
What am I missing here?
t
SignupInput has to be
input
not
type
👍 2
j
Thank you! Trying to refactor my signup and I found this example: https://graphql-authentication-demo.now.sh/ I thought that since they typed their’s like so:
Copy code
type SignupInput {
	email: String!
	password: String!
	name: String!
}
But apparently its:
Copy code
input SignupInput {
	email: String!
	password: String!
	name: String!
}
Thanks again for the help!
👍 1