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

}

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

type AuthPayload {
  token: String
  user: User
}

type User {
  id: ID!
  name: String!
  email: String!
  links: [Link!]!
}

type Mutation {
  signup(email: String!, password: String!, name: 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
}