All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 39s
42 lines
827 B
TypeScript
Executable File
42 lines
827 B
TypeScript
Executable File
export const schema = gql`
|
|
type Project {
|
|
id: Int!
|
|
title: String!
|
|
description: String!
|
|
images: [String]!
|
|
date: DateTime!
|
|
links: [URL]!
|
|
tags: [Tag]!
|
|
}
|
|
|
|
type Query {
|
|
projects: [Project!]! @skipAuth
|
|
project(id: Int!): Project @skipAuth
|
|
}
|
|
|
|
input CreateProjectInput {
|
|
title: String!
|
|
description: String!
|
|
date: DateTime!
|
|
links: [URL]!
|
|
images: [URL]!
|
|
tags: [Int!]
|
|
}
|
|
|
|
input UpdateProjectInput {
|
|
title: String
|
|
description: String
|
|
date: DateTime
|
|
links: [URL]!
|
|
images: [URL]!
|
|
tags: [Int!]
|
|
removeTags: [Int!]
|
|
}
|
|
|
|
type Mutation {
|
|
createProject(input: CreateProjectInput!): Project! @requireAuth
|
|
updateProject(id: Int!, input: UpdateProjectInput!): Project! @requireAuth
|
|
deleteProject(id: Int!): Project! @requireAuth
|
|
}
|
|
`
|