updated codegen, fixed tsconfig, added prisma
added login, registration and session check
This commit is contained in:
parent
9518787206
commit
04b606b7fa
24 changed files with 740 additions and 1747 deletions
|
|
@ -1,6 +1,37 @@
|
|||
scalar Void
|
||||
|
||||
type Query {
|
||||
booksMany: [Book]!
|
||||
bookOne(input: BookInput!): [Book]!
|
||||
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 {
|
||||
|
|
@ -8,7 +39,3 @@ type Book {
|
|||
title: String!
|
||||
author: String!
|
||||
}
|
||||
|
||||
input BookInput {
|
||||
id: ID!
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue