Skip to content

Commit 0a220d9

Browse files
authored
Merge pull request #456 from MasaGon/fix/hide-school-name
[DB Schema should be fixed] Hide school name for public students
2 parents ec41063 + 2a5d0f3 commit 0a220d9

File tree

10 files changed

+649
-94
lines changed

10 files changed

+649
-94
lines changed

.graphqlconfig.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
projects:
22
studyathome:
3-
schemaPath: src/graphql/schema.json
3+
schemaPath: amplify/backend/api/studyathome/build/schema.graphql
44
includes:
55
- src/graphql/**/*.ts
66
excludes:

amplify/backend/api/studyathome/schema.graphql

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
type School
2+
@model
3+
@auth(
4+
rules: [
5+
{ allow: private, operations: [create], provider: userPools }
6+
{ allow: owner, operations: [read, update, delete], provider: userPools, ownerField: "owner" }
7+
]
8+
)
9+
{
10+
id: ID!
11+
name: String!
12+
owner: String!
13+
}
14+
115
type Class
216
@model
317
@auth(
@@ -9,8 +23,9 @@ type Class
923
)
1024
{
1125
id: ID!
26+
schoolId: ID!
27+
school: School! @connection(fields: ["schoolId"])
1228
className: String!
13-
schoolName: String!
1429
lessons: [Lesson!] @connection(keyName: "byClass", fields: ["id"])
1530
owner: String!
1631
}

0 commit comments

Comments
 (0)