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!
|
|
|
|
info: [EventInformation]!
|
|
|
|
time: EventTime!
|
|
|
|
status: EventStatus!
|
|
|
|
contact: [EventContactPerson!]!
|
|
|
|
location: Location!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type Location {
|
2019-02-18 08:48:30 +01:00
|
|
|
address: String
|
|
|
|
name: String
|
|
|
|
coordinate: GeoCoordinate
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-02-18 08:48:30 +01:00
|
|
|
type GeoCoordinate {
|
|
|
|
lat: Float
|
|
|
|
lng: Float
|
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 {
|
|
|
|
language: String!
|
|
|
|
title: String!
|
|
|
|
description: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-03-08 15:58:35 +01:00
|
|
|
type EventContactPerson {
|
|
|
|
name: String!
|
|
|
|
languages: [Language!]
|
|
|
|
contact: Contact
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-02-22 12:23:19 +01:00
|
|
|
type Contact {
|
2019-02-18 08:48:30 +01:00
|
|
|
email: String
|
|
|
|
phone: String
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
input EventsQueryFilter {
|
2019-02-18 08:48:30 +01:00
|
|
|
limit: Int
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
input EventTimeInput {
|
|
|
|
timeZone: TimeZone
|
|
|
|
status: EventStatus
|
|
|
|
start: Timestamp
|
|
|
|
end: Timestamp
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventContactInput {
|
|
|
|
email: String
|
|
|
|
phone: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventInformationInput {
|
|
|
|
language: String!
|
|
|
|
title: String!
|
|
|
|
description: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input GeoCoordinateInput {
|
|
|
|
lat: Float
|
|
|
|
lng: Float
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventLocationInput {
|
|
|
|
address: String
|
|
|
|
name: String
|
|
|
|
coordinate: GeoCoordinateInput
|
|
|
|
}
|
|
|
|
|
|
|
|
input EventMetaInput {
|
|
|
|
tags: [String]
|
|
|
|
}
|
|
|
|
|
2019-02-22 12:23:19 +01:00
|
|
|
input EventContactPersonInput {
|
|
|
|
name: String!
|
|
|
|
languages: [Language!]
|
|
|
|
contact: EventContactInput
|
|
|
|
}
|
|
|
|
|
2019-02-03 16:18:37 +01:00
|
|
|
input CreateEventInput {
|
2019-02-18 08:48:30 +01:00
|
|
|
owner: ID!
|
2019-02-03 16:18:37 +01:00
|
|
|
time: EventTimeInput
|
|
|
|
info: [EventInformationInput]
|
|
|
|
location: EventLocationInput
|
|
|
|
meta: EventMetaInput
|
2019-02-18 08:48:30 +01:00
|
|
|
status: String!
|
2019-02-22 12:23:19 +01:00
|
|
|
contact: [EventContactPersonInput!]!
|
2019-02-03 16:18:37 +01:00
|
|
|
}
|
|
|
|
|
2019-03-11 13:39:16 +01:00
|
|
|
type Error {
|
|
|
|
path: String!
|
|
|
|
message: String!
|
|
|
|
}
|
2019-02-03 16:18:37 +01:00
|
|
|
type Mutation {
|
|
|
|
# Auth
|
2019-03-11 13:39:16 +01:00
|
|
|
signup(input: SignupInput): Boolean
|
2019-02-03 16:18:37 +01:00
|
|
|
signin(input: SigninInput): UserSession!
|
|
|
|
requestInvite(input: RequestInviteInput): Boolean!
|
|
|
|
|
|
|
|
# Event
|
2019-02-18 08:48:30 +01:00
|
|
|
createEvent(input: CreateEventInput, foo: String): CalendarEvent
|
2019-02-03 16:18:37 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
# Auth
|
|
|
|
me: User
|
|
|
|
|
|
|
|
# Event
|
|
|
|
events(filter: EventsQueryFilter): [CalendarEvent]
|
|
|
|
}
|