-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path3.apollo-mongo-schema.js
More file actions
52 lines (43 loc) · 926 Bytes
/
3.apollo-mongo-schema.js
File metadata and controls
52 lines (43 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// import { readFileSync } from 'fs';
// const typeDefs = readFileSync('schema.graphql', 'UTF8');
export const confacSchema = `#graphql
type Audit {
createdOn: String!
createdBy: String!
modifiedOn: String
modifiedBy: String
}
interface Audited {
audit: Audit!
}
type User implements Audited {
id: ID!
name: String!
firstName: String!
alias: String!
email: String!
active: Boolean!
roles: [String!]!
audit: Audit!
}
type Query {
hello: String!
users: [User!]!
user(id: ID!): User
}
type Mutation {
createUser(name: String!, firstName: String, roles: [String]): User
deleteUser(id: ID!): Boolean
updateUser(id: ID! name: String, firstName: String, roles: [String]): User
}
input UserCreation {
name: String!
firstName: String!
roles: [String!]!
}
enum ProjectStatus {
TRUE
FALSE
FORCED
}
`