server/schema.graphql
# keep in sync with graphql.ts and graphql.py
scalar Date
scalar oid
type Sync {
id: oid!
timestamp: Date!
title: String
details: String
}
type Mate {
id: oid!
name: String!
syncs: [Sync!]!
}
type Family {
id: oid!
sync_interval_days: Int!
name: String!
mates: [Mate!]!
}
type User {
id: oid!
first_name: String!
picture_url: String
email: String!
unassigned_family: Family!
families: [Family!]!
}
input NewMatesInput {
name: String!
lastSynced: Date
}
input MateAssignmentInput {
mateId: String!
fromFamilyId: String!
toFamilyId: String!
}
type Query {
getUserData: User
}
type Mutation {
addNewMates(mates: [NewMatesInput]!): [Mate]
assignMates(mateAssignments: [MateAssignmentInput]!): [String!]
}