2019-03-08 15:58:35 +01:00
|
|
|
type User {
|
2019-03-11 13:39:16 +01:00
|
|
|
name: String!
|
2019-03-08 15:58:35 +01:00
|
|
|
username: String!
|
|
|
|
email: String!
|
|
|
|
id: ID!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
2019-01-30 14:19:18 +01:00
|
|
|
|
2019-02-03 16:18:37 +01:00
|
|
|
scalar Date
|
|
|
|
|
2019-03-08 15:58:35 +01:00
|
|
|
type UserSession {
|
|
|
|
hash: String!
|
|
|
|
user: User!
|
|
|
|
ctime: Date!
|
|
|
|
isValid: Boolean!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
input SignupInput {
|
|
|
|
email: String!
|
|
|
|
username: String!
|
2019-03-11 13:39:16 +01:00
|
|
|
name: String!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
input SigninInput {
|
|
|
|
hash: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
input RequestInviteInput {
|
|
|
|
email: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
# ------
|
|
|
|
# Events
|
|
|
|
# ------
|
|
|
|
|
|
|
|
|
2019-03-08 15:58:35 +01:00
|
|
|
type CalendarEvent {
|
|
|
|
id: ID!
|
|
|
|
owner: User!
|
2019-04-27 11:37:13 +02:00
|
|
|
info: [EventInformation]!
|
2019-03-08 15:58:35 +01:00
|
|
|
time: EventTime!
|
|
|
|
status: EventStatus!
|
|
|
|
location: Location!
|
2019-04-26 12:04:18 +02:00
|
|
|
occurrences: [EventOccurrence]
|
|
|
|
}
|
|
|
|
|
|
|
|
type EventOccurrence {
|
|
|
|
id: ID!
|
|
|
|
event: CalendarEvent!
|
|
|
|
start: String!
|
|
|
|
utcStart: String!
|
|
|
|
end: String!
|
|
|
|
utcEnd: String!
|
|
|
|
timeZone: String!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Location {
|
2019-02-18 08:48:30 +01:00
|
|
|
address: String
|
|
|
|
name: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 08:48:30 +01:00
|
|
|
type EventTime {
|
|
|
|
timeZone: TimeZone
|
|
|
|
start: Timestamp
|
|
|
|
end: Timestamp
|
|
|
|
recurrence: String
|
|
|
|
exceptions: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# in RFC3339 e.g. 2002-10-02T10:00:00-05:00 or 2002-10-02T15:00:00Z
|
|
|
|
scalar Timestamp
|
|
|
|
|
|
|
|
# IANA Timezone e.g. "Europe/Zurich"
|
|
|
|
scalar TimeZone
|
|
|
|
|
|
|
|
# "confirmed" | "tentative" | "cancelled"
|
|
|
|
scalar EventStatus
|
|
|
|
|
|
|
|
# e.g. 'de', 'en', etc'
|
|
|
|
scalar Language
|
|
|
|
|
|
|
|
# Event information for presentation
|
2019-03-08 15:58:35 +01:00
|
|
|
type EventInformation {
|
2019-04-27 11:37:13 +02:00
|
|
|
language: String!
|
2019-03-08 15:58:35 +01:00
|
|
|
title: String!
|
|
|
|
description: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-04-26 12:04:18 +02:00
|
|
|
scalar Category
|
|
|
|
|
2019-02-03 16:18:37 +01:00
|
|
|
input EventsQueryFilter {
|
2019-03-23 18:13:06 +01:00
|
|
|
owner: ID
|
2019-04-26 12:04:18 +02:00
|
|
|
limit: Int
|
|
|
|
from: Timestamp
|
|
|
|
to: Timestamp
|
|
|
|
categories: [Category]
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-04-26 12:04:18 +02:00
|
|
|
input OccurrencesQueryFilter {
|
|
|
|
from: Timestamp
|
|
|
|
to: Timestamp
|
2019-02-03 16:18:37 +01:00
|
|
|
timeZone: TimeZone
|
2019-04-26 12:04:18 +02:00
|
|
|
categories: [Category]
|
|
|
|
limit: Int
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventTimeInput {
|
|
|
|
timeZone: TimeZone!
|
|
|
|
start: Timestamp!
|
|
|
|
end: Timestamp!
|
|
|
|
recurrence: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
input EventInformationInput {
|
|
|
|
language: String!
|
|
|
|
title: String!
|
|
|
|
description: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventLocationInput {
|
|
|
|
address: String
|
|
|
|
name: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventMetaInput {
|
2019-06-05 07:57:15 +02:00
|
|
|
tags: [String]!
|
2019-02-22 12:23:19 +01:00
|
|
|
}
|
|
|
|
|
2019-02-03 16:18:37 +01:00
|
|
|
input CreateEventInput {
|
2019-05-24 19:59:54 +02:00
|
|
|
time: EventTimeInput!
|
|
|
|
info: [EventInformationInput]!
|
|
|
|
location: EventLocationInput!
|
2019-06-05 07:57:15 +02:00
|
|
|
meta: EventMetaInput!
|
2019-02-18 08:48:30 +01:00
|
|
|
status: String!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-06-04 14:03:51 +02:00
|
|
|
input UpdateEventInput {
|
|
|
|
id: ID!
|
2019-06-05 07:57:15 +02:00
|
|
|
time: EventTimeInput
|
|
|
|
info: [EventInformationInput!]
|
|
|
|
location: EventLocationInput
|
2019-06-04 14:03:51 +02:00
|
|
|
meta: EventMetaInput
|
2019-06-05 07:57:15 +02:00
|
|
|
status: String
|
2019-06-04 14:03:51 +02:00
|
|
|
}
|
|
|
|
|
2019-03-11 13:39:16 +01:00
|
|
|
type Error {
|
|
|
|
path: String!
|
|
|
|
message: String!
|
|
|
|
}
|
2019-03-11 15:48:56 +01:00
|
|
|
|
2019-02-03 16:18:37 +01:00
|
|
|
type Mutation {
|
|
|
|
# Auth
|
2019-03-11 15:48:56 +01:00
|
|
|
signup(input: SignupInput): [Error]
|
2019-02-03 16:18:37 +01:00
|
|
|
signin(input: SigninInput): UserSession!
|
|
|
|
requestInvite(input: RequestInviteInput): Boolean!
|
|
|
|
|
|
|
|
# Event
|
2019-04-26 12:04:18 +02:00
|
|
|
createEvent(input: CreateEventInput!): CalendarEvent
|
2019-06-04 14:03:51 +02:00
|
|
|
updateEvent(input: UpdateEventInput!): CalendarEvent
|
2019-02-03 16:18:37 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
# Auth
|
|
|
|
me: User
|
|
|
|
|
|
|
|
# Event
|
2019-05-24 19:59:54 +02:00
|
|
|
event(id: ID!): CalendarEvent
|
2019-03-18 11:25:43 +01:00
|
|
|
events(filter: EventsQueryFilter!): [CalendarEvent]
|
2019-04-26 12:04:18 +02:00
|
|
|
occurrences(filter: OccurrencesQueryFilter!): [EventOccurrence]
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|