Files
portfolio/api/src/graphql/projects.sdl.ts
Ahmed Al-Taiar 0283c293ef
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 39s
An attempt to fix the PDF iframe not loading properly when the API domain is third-partyBasic printer CRUD
2025-04-06 18:08:05 -04:00

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
}
`