parent
903db55e5c
commit
a9f5e760fd
@ -0,0 +1,5 @@
|
||||
PGADMIN_DEFAULT_EMAIL: placeholder@example.com
|
||||
PGADMIN_DEFAULT_PASSWORD: fakepassword123!
|
||||
POSTGRES_USER=root
|
||||
POSTGRES_PASSWORD=root
|
||||
POSTGRES_DB=root
|
@ -0,0 +1,15 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { GraphQLModule } from '@nestjs/graphql';
|
||||
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
GraphQLModule.forRoot<ApolloDriverConfig>({
|
||||
driver: ApolloDriver,
|
||||
typePaths: ['./**/*.gql'],
|
||||
context: ({ req }) => ({ req }),
|
||||
playground: true,
|
||||
}),
|
||||
],
|
||||
})
|
||||
export class ApiGatewayModule {}
|
@ -0,0 +1,36 @@
|
||||
type User {
|
||||
id: ID!
|
||||
name: String!
|
||||
email: String!
|
||||
password: String!
|
||||
createdAt: String!
|
||||
updatedAt: String!
|
||||
}
|
||||
|
||||
type AuthPayload {
|
||||
token: String!
|
||||
user: User!
|
||||
}
|
||||
|
||||
input SignUpInput {
|
||||
name: String!
|
||||
email: String!
|
||||
password: String!
|
||||
}
|
||||
|
||||
input SignInInput {
|
||||
email: String!
|
||||
password: String!
|
||||
}
|
||||
|
||||
type Query {
|
||||
me: User! @authenticated
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
signUp(input: SignUpInput!): AuthPayload!
|
||||
signIn(input: SignInInput!): AuthPayload!
|
||||
signOut: Boolean! @authenticated
|
||||
}
|
||||
|
||||
directive @authenticated on FIELD_DEFINITION
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue