update
This commit is contained in:
32
src copy/schema.graphql
Normal file
32
src copy/schema.graphql
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user