This commit is contained in:
jackbeeby
2025-03-31 16:13:56 +11:00
parent d8773925e8
commit 0b9d543d36
22 changed files with 3203 additions and 32 deletions

32
src copy/schema.graphql Normal file
View File

@@ -0,0 +1,32 @@
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
}