ln/app/server/graphql/schema.graphql
lnn0q 04b606b7fa updated codegen, fixed tsconfig, added prisma
added login, registration and session check
2025-03-23 21:06:15 +02:00

41 lines
561 B
GraphQL

scalar Void
type Query {
booksMany: [Book!]!
bookOne(id: ID!): Book!
}
type Mutation {
login(input: LoginInput!): Session!
register(input: RegisterInput!): Void!
}
input LoginInput {
email: String!
password: String!
}
input RegisterInput {
email: String!
username: String!
password: String!
}
type Session {
accessToken: String!
refreshToken: RefreshToken!
}
type RefreshToken {
token: String!
maxAge: Int!
secure: Boolean!
httpOnly: Boolean!
sameSite: String!
}
type Book {
id: ID!
title: String!
author: String!
}