Skip to content

Commit

Permalink
feat: setup base admin
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Jan 1, 2021
1 parent 32b8305 commit 060dfa1
Show file tree
Hide file tree
Showing 145 changed files with 4,756 additions and 870 deletions.
93 changes: 93 additions & 0 deletions api-schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------

"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime

type IntercomMessage {
payload: JSON
scope: String
type: String
}

"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")

input LoginInput {
email: String!
password: String!
}

type MetaField {
id: String
required: Boolean
type: MetaFieldType
}

type MetaFieldType {
id: String
}

type MetaModel {
fields: [MetaField!]
id: String
}

type Mutation {
intercomPub(payload: JSON, scope: String, type: String!): IntercomMessage
login(input: LoginInput!): UserToken
logout: Boolean
register(input: RegisterInput!): UserToken
}

type Query {
me: User
metaModels: [MetaModel!]
uptime: Float
}

input RegisterInput {
avatarUrl: String
email: String!
firstName: String
lastName: String
password: String!
phone: String
username: String
}

"""User role"""
enum Role {
Admin
User
}

type Subscription {
intercomSub(scope: String, type: String): IntercomMessage
}

type User {
avatarUrl: String
bio: String
createdAt: DateTime
email: String
firstName: String
id: String
lastName: String
location: String
phone: String
role: Role
updatedAt: DateTime
username: String
}

type UserToken {
"""JWT Bearer token"""
token: String!
user: User!
}
5 changes: 3 additions & 2 deletions apps/api/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Module } from '@nestjs/common'
import { ApiAuthFeatureModule } from '@nx-prisma-admin/api/auth/feature'
import { ApiCoreFeatureModule } from '@nx-prisma-admin/api/core/feature'
import { Module } from '@nestjs/common'
import { ApiMetaFeatureModule } from '@nx-prisma-admin/api/meta/feature'

@Module({
imports: [ApiAuthFeatureModule, ApiCoreFeatureModule],
imports: [ApiAuthFeatureModule, ApiCoreFeatureModule, ApiMetaFeatureModule],
})
export class AppModule {}
2 changes: 1 addition & 1 deletion apps/web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<body class="dark">
<nx-prisma-admin-root></nx-prisma-admin-root>
</body>
</html>
Loading

0 comments on commit 060dfa1

Please sign in to comment.