Files
portfolio/api/src/graphql/socials.sdl.ts
Ahmed Al-Taiar 77db153fe6 Add Matrix social
2024-10-15 14:51:43 -04:00

55 lines
854 B
TypeScript

export const schema = gql`
type Social {
id: Int!
name: String!
type: Handle!
username: String!
}
enum Handle {
x
threads
instagram
facebook
tiktok
youtube
steam
discord
twitch
linkedin
matrix
github
gitea
forgejo
gitlab
bitbucket
leetcode
email
phone
custom
}
type Query {
socials: [Social!]! @skipAuth
social(id: Int!): Social @skipAuth
}
input CreateSocialInput {
name: String!
type: Handle!
username: String!
}
input UpdateSocialInput {
name: String
type: Handle
username: String
}
type Mutation {
createSocial(input: CreateSocialInput!): Social! @requireAuth
updateSocial(id: Int!, input: UpdateSocialInput!): Social! @requireAuth
deleteSocial(id: Int!): Social! @requireAuth
}
`