type Query {
  info: String
  feed(id: Int): [Account] #straight brackets when needing to link the data to another table
  account: [Account]

}

type Link {
  id: Int!
  description: String!
  url: String!
  postedBy: Account
}

type AuthPayload {
  token: String
  account: Account #no brackets when its a single result
}

type Account {
  id: Int!
  firstName: String
  lastName: String!
  email: String!
  accountInformation: [AccountInformation]
}

type AccountInformation {
  id: Int!
  sex: String!
  age: Int!
}


type Mutation {
  signup(email: String!, password: String!, firstName: String!): AuthPayload
  
  login(email: String!, password: String!): AuthPayload
  post(url: String!, description: String!): Link!
  updatePost(id: Int!, description: String!, url: String!): Link
  deletePost(id: Int!): Link
}