Files
Job_App/src copy/schema.graphql
jackbeeby 0b9d543d36 update
2025-03-31 16:13:56 +11:00

32 lines
619 B
GraphQL

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
}