Skip to content

Instantly share code, notes, and snippets.

@renanmav
Created May 20, 2020 21:36
Show Gist options
  • Save renanmav/819efb8ff8e157ba31c4a2f7266f1f71 to your computer and use it in GitHub Desktop.
Save renanmav/819efb8ff8e157ba31c4a2f7266f1f71 to your computer and use it in GitHub Desktop.
"""Address"""
type Address {
fullAddress: String
shortAddress: String
zipcode: String
street: String
number: String
neighborhood: String
city: String
state: String
complement: String
timezone: String
country: String
location: Location
rawGoogleApiResponse: String
}
"""AddressInput"""
input AddressInput {
fullAddress: String
shortAddress: String
zipcode: String
street: String
number: String
neighborhood: String
city: String
state: String
complement: String
timezone: String
country: String
lat: Float
lng: Float
}
enum DirectionEnum {
ASC
DESC
}
"""Represents Event"""
type Event implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
title: String
description: String
descriptionHtml: String
organization: Organization!
eventForm: EventForm
createdBy: User!
"""Profile image of this event. It returns the newest one."""
coverImages: File
isOwner(user: ID): Boolean
address: Address!
date: String
slug: String
features: [String]
modules: EventModules!
hasAttended: Boolean
positionInQueue: Int
style: EventStyle
isActive: Boolean
inviteCode: String
"""Max number of attendees. 0 means infinity."""
maxAttendees: Int
removedAt: String
createdAt: String
attendees(after: String, first: Int, before: String, last: Int, search: String, filters: EventUsersFilters): UserConnection!
"""Tells if an event is full or not"""
isFull: Boolean!
"""Tell if event is expired or not"""
isExpired: Boolean!
"""Counts all checkin done until now"""
checkinCounter: Int!
"""Event queue size"""
queueLength: Int!
"""Counts all users that liked this event"""
likeCounter: Int!
"""Whether user has liked this event or not"""
userHasLiked(user: ID): Boolean!
posts(after: String, first: Int, before: String, last: Int): EventSocialPostConnection!
raffles(after: String, first: Int, before: String, last: Int): EventRaffleConnection!
tickets(after: String, first: Int, before: String, last: Int): EventTicketConnection!
}
input EventAddInput {
title: String!
description: String!
descriptionHtml: String
date: String!
address: AddressInput!
maxAttendees: Int
map: String
sponsors: [sponsor]
socialMedia: [String]
checkIn: Boolean
style: style
clientMutationId: String
}
type EventAddPayload {
eventEdge: EventEdge
error: String
clientMutationId: String
}
input EventAttendInput {
event: ID!
answers: [String]
clientMutationId: String
}
type EventAttendPayload {
eventUser: EventUser
me: User
eventEdge: EventEdge
error: String
clientMutationId: String
}
input EventCancelAttendInput {
event: ID!
clientMutationId: String
}
type EventCancelAttendPayload {
eventUser: EventUser
me: User
userEdge: UserEdge
event: Event
eventEdge: EventEdge
error: String
clientMutationId: String
}
input EventCheckinInput {
id: ID!
dateTime: String!
clientMutationId: String
}
type EventCheckinPayload {
eventUserEdge: EventUserEdge
event: Event
error: String
clientMutationId: String
}
"""A connection to a list of items."""
type EventConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [EventEdge]!
}
"""An edge in a connection."""
type EventEdge {
"""The item at the end of the edge"""
node: Event!
"""A cursor for use in pagination"""
cursor: String!
}
input EventEditCoverImageInput {
"""Event id"""
event: ID!
"""File path at google storage"""
url: String!
"""File type at google storage"""
mimeType: String!
clientMutationId: String
}
type EventEditCoverImagePayload {
eventEdge: EventEdge
error: String
clientMutationId: String
}
input EventEditInput {
event: ID!
title: String
description: String
descriptionHtml: String
date: String
address: AddressInput
maxAttendees: Int
clientMutationId: String
}
type EventEditPayload {
eventEdge: EventEdge
error: String
clientMutationId: String
}
"""Event filters types"""
input EventFilters {
"""Filter events that happened before today"""
past: Boolean
"""Filter events that will happen"""
future: Boolean
"""Start date interval as ISO String"""
startDate: String
"""End date interval as ISO String"""
endDate: String
"""Which order results are returned"""
orderBy: [EventOrderByFilter]
}
"""Represents an EventForm"""
type EventForm implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
"""Event"""
event: Event
"""EventForm questions"""
questions: [String]
isActive: Boolean
removedAt: String
}
input EventFormEditInput {
event: ID!
questions: [String]!
clientMutationId: String
}
type EventFormEditPayload {
eventForm: EventForm
error: String
clientMutationId: String
}
input EventJoinInviteCodeInput {
inviteCode: String!
clientMutationId: String
}
type EventJoinInviteCodePayload {
eventEdge: EventEdge
error: String
clientMutationId: String
}
type EventMap {
link: String
}
"""Event modules"""
type EventModules {
map: EventMap
sponsors: [Sponsor]
socialMedia: [String]
checkIn: Boolean
}
"""How events should be ordered by"""
input EventOrderByFilter {
sort: String
direction: DirectionEnum
}
"""Represents an Event Raffle"""
type EventRaffle implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
"""User"""
name: String!
"""Event"""
event: Event!
createdAt: String
triggeredBy: User!
winners: [User]!
}
input EventRaffleAddInput {
name: String!
event: ID!
preferences: Preferences!
clientMutationId: String
}
type EventRaffleAddPayload {
eventRaffleEdge: EventRaffleEdge
error: String
clientMutationId: String
}
"""A connection to a list of items."""
type EventRaffleConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [EventRaffleEdge]!
}
"""An edge in a connection."""
type EventRaffleEdge {
"""The item at the end of the edge"""
node: EventRaffle!
"""A cursor for use in pagination"""
cursor: String!
}
input EventRemoveInput {
event: ID!
clientMutationId: String
}
type EventRemovePayload {
eventEdge: EventEdge
error: String
clientMutationId: String
}
"""Represents an EventSocialComment"""
type EventSocialComment implements Node {
"""The ID of an object"""
id: ID!
"""Event this comment belongs to"""
event: Event!
"""User that created this comment"""
author: User!
"""Which post this comment belongs to"""
post: EventSocialPost!
"""If this comment is a reply, which comment is it replying."""
comment: EventSocialComment
"""Text body of this comment"""
body: String!
"""Replies made to this comment"""
replies(after: String, first: Int, before: String, last: Int): EventSocialCommentConnection
isActive: Boolean!
createdAt: String!
updatedAt: String!
}
"""A connection to a list of items."""
type EventSocialCommentConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [EventSocialCommentEdge]!
}
"""An edge in a connection."""
type EventSocialCommentEdge {
"""The item at the end of the edge"""
node: EventSocialComment!
"""A cursor for use in pagination"""
cursor: String!
}
"""Represents a EventSocialPost"""
type EventSocialPost implements Node {
"""The ID of an object"""
id: ID!
"""Event this was posted in"""
event: Event!
"""User that created this post"""
author: User!
"""Text body of this post"""
body: String
"""Whether it was posted through web or app"""
channel: String!
"""All comments rooted to this post"""
comments(after: String, first: Int, before: String, last: Int): EventSocialCommentConnection
"""Number of comments in this post"""
commentCount: Int!
isActive: Boolean
removedAt: String
createdAt: String!
updatedAt: String
}
input EventSocialPostAddInput {
event: ID!
body: String!
clientMutationId: String
}
type EventSocialPostAddPayload {
eventSocialPostEdge: EventSocialPostEdge
error: String
clientMutationId: String
}
input EventSocialPostCommentAddInput {
eventId: ID!
postId: ID!
body: String!
clientMutationId: String
}
type EventSocialPostCommentAddPayload {
post: EventSocialPost
commentEdge: EventSocialCommentEdge
error: String
clientMutationId: String
}
"""A connection to a list of items."""
type EventSocialPostConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [EventSocialPostEdge]!
}
"""An edge in a connection."""
type EventSocialPostEdge {
"""The item at the end of the edge"""
node: EventSocialPost
"""A cursor for use in pagination"""
cursor: String!
}
"""Represents EventStyleType"""
type EventStyle {
primaryText: String
secondaryText: String
primaryBackground: String
secondaryBackground: String
primaryAccent: String
secondaryAccent: String
}
"""Represents a ticket entity"""
type EventTicket implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: ID!
"""Which event this ticket is related to"""
event: Event
"""Which batches this ticket has"""
batches: [EventTicketBatch]!
}
input EventTicketAddInput {
event: SlugOrId!
batches: [EventTicketBatchInput]
clientMutationId: String
}
type EventTicketAddPayload {
eventTicket: EventTicket
error: String
clientMutationId: String
}
"""Each record represents a batch of a given ticket"""
type EventTicketBatch {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: ID!
"""Name of the batch"""
name: String!
"""How much this batch costs"""
price: Float!
"""Number of ticket that this batch has"""
numberOfTickets: Int!
"""When the ticket will be valid to buy"""
startDate: String!
"""When the ticket is no longer available to buy"""
endDate: String!
"""Min order quantity defined by event owner"""
minOrder: Int!
"""Max order quantity defined by event owner"""
maxOrder: Int!
"""Tells if batch should be visible or not after sales starts"""
isActive: Boolean!
"""How much tickets were sold"""
soldTickets: Int!
}
input EventTicketBatchAddInput {
eventTicket: ID!
newBatches: [EventTicketBatchInput]!
clientMutationId: String
}
type EventTicketBatchAddPayload {
eventTicket: EventTicket
error: String
clientMutationId: String
}
input EventTicketBatchInput {
"""Name of the batch"""
name: String!
"""How much this batch costs"""
price: Float!
"""Number of ticket that this batch has"""
numberOfTickets: Int!
"""When the ticket will be valid to buy"""
startDate: String
"""When the ticket is no longer available to buy"""
endDate: String
"""Min order quantity"""
minOrder: Int
"""Max order quantity"""
maxOrder: Int
"""Tells if batch should be visible or not after sales starts"""
isActive: Boolean
}
"""A connection to a list of items."""
type EventTicketConnection {
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""A list of edges."""
edges: [EventTicketEdge]
}
"""An edge in a connection."""
type EventTicketEdge {
"""The item at the end of the edge"""
node: EventTicket!
"""A cursor for use in pagination"""
cursor: String!
}
"""Represents a ticket sold attached with ticket entity and batch"""
type EventTicketUser implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: ID!
"""Which user bought this ticket"""
user: User
"""Which event this sold ticket is from"""
event: Event
eventUser: EventUser
"""Which batch this sold ticket is from"""
eventTicket: EventTicket
}
input EventTicketUserAddInput {
eventTicketBatch: String!
quantity: Int
clientMutationId: String
}
type EventTicketUserAddPayload {
eventTicketUsers: [EventTicketUser]
error: String
clientMutationId: String
}
"""A connection to a list of items."""
type EventTicketUserConnection {
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""A list of edges."""
edges: [EventTicketUserEdge]
}
"""An edge in a connection."""
type EventTicketUserEdge {
"""The item at the end of the edge"""
node: EventTicketUser!
"""A cursor for use in pagination"""
cursor: String!
}
"""Ticket filters type"""
input EventTicketUserFilters {
"""Search tickets by its name and event title & description"""
search: String
"""Search by event ticket id"""
event: String
"""Search by user id"""
user: String
}
"""Represents an EventUser"""
type EventUser implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
"""Event"""
event: Event!
"""User"""
user: User!
"""User"""
answers: [String]
"""Checkin"""
checkin: EventUserCheckin
isActive: Boolean
removedAt: String
queueTimestamp: String
}
"""Represents Event User Checkin"""
type EventUserCheckin {
"""Represents event user id"""
id: ID!
"""Represents the date time user has checked in"""
dateTime: String!
}
"""An edge in a connection."""
type EventUserEdge {
"""The item at the end of the edge"""
node: EventUser!
"""A cursor for use in pagination"""
cursor: String!
}
"""Event users filters types"""
input EventUsersFilters {
"""
Filter users that have confirmed presence and users that are at waiting list
"""
all: Boolean
}
"""Represents File"""
type File implements Node {
"""The ID of an object"""
id: ID!
"""Organization which belongs this file"""
organization: Organization
"""User who uploaded this file"""
user: User
originalFileName: String
fileName: String
url: String
priority: Int
type: String
mimeType: String
createdAt: String
updatedAt: String
}
"""Location"""
type Location {
"""Longitude"""
lng: Float
"""Latitude"""
lat: Float
}
input LocationInput {
"""Longitude"""
lng: Float
"""Latitude"""
lat: Float
}
input LoginWithFacebookInput {
"""Access token provided by facebook callback"""
accessToken: String!
"""Time to token expire"""
expiresIn: Int!
"""Time to data access expire"""
dataAccessExpirationTime: String!
lang: String
clientMutationId: String
}
type LoginWithFacebookPayload {
error: String
token: String
me: User
user: User @deprecated(reason: "Use me")
clientMutationId: String
}
input LoginWithGithubInput {
"""Code provided by github callback to get the access token"""
code: String!
lang: String
clientMutationId: String
}
type LoginWithGithubPayload {
error: String
token: String
me: User
clientMutationId: String
}
input MeEditInput {
name: String
email: String
mobileNumber: String
occupation: String
position: String
taxId: String
lang: String
clientMutationId: String
}
type MeEditPayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
type Mutation {
OrganizationAdd(input: OrganizationAddInput!): OrganizationAddPayload
OrganizationPaymentAdd(input: OrganizationPaymentAddInput!): OrganizationPaymentAddPayload
OrganizationEdit(input: OrganizationEditInput!): OrganizationEditPayload
OrganizationEditCoverImage(input: OrganizationEditCoverImageInput!): OrganizationEditCoverImagePayload
OrganizationEditProfileImage(input: OrganizationEditProfileImageInput!): OrganizationEditProfileImagePayload
UserAdd(input: UserAddInput!): UserAddPayload
UserEdit(input: UserEditInput!): UserEditPayload
MeEdit(input: MeEditInput!): MeEditPayload
UserEditProfileImage(input: UserEditProfileImageInput!): UserEditProfileImagePayload
UserEditCoverImage(input: UserEditCoverImageInput!): UserEditCoverImagePayload
UserLogin(input: UserLoginInput!): UserLoginPayload
UserLogout(input: UserLogoutInput!): UserLogoutPayload
UserForgotPassword(input: UserForgotPasswordInput!): UserForgotPasswordPayload
OrganizationUserAdd(input: OrganizationUserAddInput!): OrganizationUserAddPayload
OrganizationUserJoin(input: OrganizationUserJoinInput!): OrganizationUserJoinPayload
OrganizationUserLeave(input: OrganizationUserLeaveInput!): OrganizationUserLeavePayload
OrganizationUserAddRoles(input: OrganizationUserAddRolesInput!): OrganizationUserAddRolesPayload
OrganizationUserRemoveRoles(input: OrganizationUserRemoveRolesInput!): OrganizationUserRemoveRolesPayload
OrganizationUserRemove(input: OrganizationUserRemoveInput!): OrganizationUserRemovePayload
EventAdd(input: EventAddInput!): EventAddPayload
EventEdit(input: EventEditInput!): EventEditPayload
EventEditCoverImage(input: EventEditCoverImageInput!): EventEditCoverImagePayload
EventAttend(input: EventAttendInput!): EventAttendPayload
EventCancelAttend(input: EventCancelAttendInput!): EventCancelAttendPayload
EventJoinInviteCode(input: EventJoinInviteCodeInput!): EventJoinInviteCodePayload
EventRemove(input: EventRemoveInput!): EventRemovePayload
EventCheckin(input: EventCheckinInput!): EventCheckinPayload
UserEventLikeAdd(input: UserEventLikeAddInput!): UserEventLikeAddPayload
EventFormEdit(input: EventFormEditInput!): EventFormEditPayload
"""Use this mutation to login through facebook"""
LoginWithFacebook(input: LoginWithFacebookInput!): LoginWithFacebookPayload
"""Use this mutation to login through github"""
LoginWithGithub(input: LoginWithGithubInput!): LoginWithGithubPayload
UserNotificationMarkAllAsOpened(input: UserNotificationMarkAllAsOpenedInput!): UserNotificationMarkAllAsOpenedPayload
UserNotificationMarkAllAsRead(input: UserNotificationMarkAllAsReadInput!): UserNotificationMarkAllAsReadPayload
UserNotificationMarkAsRead(input: UserNotificationMarkAsReadInput!): UserNotificationMarkAsReadPayload
EventSocialPostAdd(input: EventSocialPostAddInput!): EventSocialPostAddPayload
EventRaffleAdd(input: EventRaffleAddInput!): EventRaffleAddPayload
EventSocialPostCommentAdd(input: EventSocialPostCommentAddInput!): EventSocialPostCommentAddPayload
EventTicketAdd(input: EventTicketAddInput!): EventTicketAddPayload
EventTicketBatchAdd(input: EventTicketBatchAddInput!): EventTicketBatchAddPayload
EventTicketUserAdd(input: EventTicketUserAddInput!): EventTicketUserAddPayload
UserEmailConfirmation(input: UserEmailConfirmationInput!): UserEmailConfirmationPayload
UserResetPassword(input: UserResetPasswordInput!): UserResetPasswordPayload
SponsorAdd(input: SponsorAddInput!): SponsorAddPayload
PreSignedUrl(input: PreSignedUrlInput!): PreSignedUrlPayload
}
"""An object with an ID"""
interface Node {
"""The id of the object."""
id: ID!
}
"""Represents an Organization"""
type Organization implements Node {
"""The ID of an object"""
id: ID!
name: String
friendlyName: String
email: String
createdBy: User
description: String
"""Cover image of this organization. It returns the newest one."""
coverImages: File
"""Profile image of this organization. It returns the newest one."""
profileImages: File
address: Address
slug: String
users(after: String, first: Int, before: String, last: Int, search: String, filters: OrganizationUserFilters): UserConnection!
myRoles: [String]
events(after: String, first: Int, before: String, last: Int, search: String, filters: EventFilters): EventConnection!
payments: [OrganizationPayment]!
paymentStatus: OrganizationPaymentStatus
isActive: Boolean
isVerified: Boolean!
removedAt: String
createdAt: String
updatedAt: String
}
input OrganizationAddInput {
name: String!
email: String
description: String
zipcode: String
lat: Float
lng: Float
clientMutationId: String
}
type OrganizationAddPayload {
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
"""A connection to a list of items."""
type OrganizationConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [OrganizationEdge]!
}
"""An edge in a connection."""
type OrganizationEdge {
"""The item at the end of the edge"""
node: Organization!
"""A cursor for use in pagination"""
cursor: String!
}
input OrganizationEditCoverImageInput {
"""Organization id"""
organization: ID!
"""File path at google storage"""
url: String!
"""File type at google storage"""
mimeType: String!
clientMutationId: String
}
type OrganizationEditCoverImagePayload {
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
input OrganizationEditInput {
id: ID
name: String
email: String
description: String
zipcode: String
lat: Float
lng: Float
owner: ID
clientMutationId: String
}
type OrganizationEditPayload {
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
input OrganizationEditProfileImageInput {
"""Organization id"""
organization: ID!
"""File path at google storage"""
url: String!
"""File type at google storage"""
mimeType: String!
clientMutationId: String
}
type OrganizationEditProfileImagePayload {
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
"""Organization filters types"""
input OrganizationFilters {
"""Filter organizations based on owner"""
owner: Boolean
"""Filter organizations based on membership"""
member: Boolean
}
"""Represents OrganizationPayment"""
type OrganizationPayment {
paidBy: User
paidAt: String
subscriptionEndAt: String
subscriptionType: Int
value: String
}
input OrganizationPaymentAddInput {
"""Organization id"""
organization: ID!
"""The subscription type in terms of months"""
subscriptionType: OrganizationPaymentSubscriptionType!
clientMutationId: String
}
type OrganizationPaymentAddPayload {
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
"""Represents OrganizationPaymentStatus"""
type OrganizationPaymentStatus {
isPaid: Boolean
remainingDays: Int
subscriptionEndAt: String
}
"""Which type of subscription"""
enum OrganizationPaymentSubscriptionType {
"""1 month of subscription"""
MONTH
"""3 months of subscription"""
QUARTER
"""6 months of subscription"""
SEMESTER
"""12 months of subscription"""
YEAR
}
"""Organizations (connection) filters types"""
input OrganizationsFilters {
"""Which order results are returned"""
orderBy: [OrganizationsOrderByFilter]
}
"""How orgs should be ordered by"""
input OrganizationsOrderByFilter {
sort: String
direction: DirectionEnum
}
input OrganizationUserAddInput {
organization: ID!
user: ID!
clientMutationId: String
}
type OrganizationUserAddPayload {
userEdge: UserEdge
error: String
clientMutationId: String
}
input OrganizationUserAddRolesInput {
organization: ID!
user: ID!
roles: [String]!
clientMutationId: String
}
type OrganizationUserAddRolesPayload {
userEdge: UserEdge
error: String
clientMutationId: String
}
"""Event users filters types"""
input OrganizationUserFilters {
"""Filter users based on roles"""
roles: [String]
"""Filter users based in roles they are not"""
notInRoles: [String]
}
input OrganizationUserJoinInput {
organization: ID!
clientMutationId: String
}
type OrganizationUserJoinPayload {
userEdge: UserEdge
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
input OrganizationUserLeaveInput {
organization: ID!
clientMutationId: String
}
type OrganizationUserLeavePayload {
userEdge: UserEdge
organizationEdge: OrganizationEdge
error: String
clientMutationId: String
}
input OrganizationUserRemoveInput {
organization: ID!
user: ID!
clientMutationId: String
}
type OrganizationUserRemovePayload {
userEdge: UserEdge
error: String
clientMutationId: String
}
input OrganizationUserRemoveRolesInput {
organization: ID!
user: ID!
roles: [String]!
clientMutationId: String
}
type OrganizationUserRemoveRolesPayload {
userEdge: UserEdge
error: String
clientMutationId: String
}
"""Information about pagination in a connection."""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
}
"""Information about pagination in a connection."""
type PageInfoExtended {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
}
"""Represents a key value parameter"""
type Parameter {
"""Parameter key"""
key: String
"""Parameter value"""
value: String
}
input Preferences {
includesOwners: Boolean!
sendNotification: Boolean!
numberOfResults: Int!
showInHistory: Boolean!
}
"""Which type of file is being uploaded"""
enum PreSignedUrlFileModuleType {
"""Files uploaded by users as profile image"""
USER_PROFILE_IMAGE
"""Files uploaded by users as cover image"""
USER_COVER_IMAGE
"""Files uploaded to be used as org cover image"""
ORGANIZATION_COVER_IMAGE
"""Files uploaded to be used as org profile image"""
ORGANIZATION_PROFILE_IMAGE
"""Files uploaded to be used as event cover image"""
EVENT_COVER_IMAGE
}
input PreSignedUrlInput {
fileModule: PreSignedUrlFileModuleType!
"""
An id to give context to this file, example: if its from an organization or from and event
"""
contextId: ID
clientMutationId: String
}
type PreSignedUrlPayload {
url: String
error: String
clientMutationId: String
}
union ProfileImage = File | SocialFile
"""The root of all... queries"""
type Query {
"""The ID of an object"""
id: ID!
"""Fetches an object given its ID"""
node(
"""The ID of an object"""
id: ID
): Node
"""Fetches objects given their IDs"""
nodes(
"""The IDs of objects"""
ids: [ID!]!
): [Node]!
"""Me is the logged User"""
me: User
status: Status
organization(id: ID, slug: String): Organization
organizations(after: String, first: Int, before: String, last: Int, search: String, filters: OrganizationsFilters): OrganizationConnection!
featuredOrganizations(after: String, first: Int, before: String, last: Int, search: String): OrganizationConnection!
user(id: ID!): User
users(after: String, first: Int, before: String, last: Int, search: String): UserConnection!
organizationUsers(after: String, first: Int, before: String, last: Int, organization: ID!, search: String, filters: OrganizationUserFilters): UserConnection!
eventUsers(after: String, first: Int, before: String, last: Int, event: ID!, search: String, filters: EventUsersFilters): UserConnection!
usersEventLiked(after: String, first: Int, before: String, last: Int, event: ID!, search: String): UserConnection!
event(id: ID, slug: String, inviteCode: String): Event
events(after: String, first: Int, before: String, last: Int, search: String, location: LocationInput, filters: EventFilters): EventConnection!
featuredEvents(after: String, first: Int, before: String, last: Int, search: String, location: LocationInput, filters: EventFilters): EventConnection!
recentEvents(after: String, first: Int, before: String, last: Int, search: String, location: LocationInput): EventConnection!
userEvents(after: String, first: Int, before: String, last: Int, user: ID!, search: String): EventConnection!
eventPosts(after: String, first: Int, before: String, last: Int, event: ID!): EventSocialPostConnection!
eventTicket(
"""Can be event slug or event ticket id"""
slugOrId: SlugOrId!
): EventTicket
}
"""Can be a slug or globalId"""
scalar SlugOrId
"""Profile image social data"""
type SocialFile {
"""The ID of an object"""
id: ID!
url: String
}
input sponsor {
name: String!
link: String
image: String
}
"""Represents a Sponsor"""
type Sponsor implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
"""Sponsor name resolver"""
name: String!
"""Sponsor image resolver"""
image: String
"""Sponsor link resolver"""
link: String
isActive: Boolean
createdAt: String
updatedAt: String
}
input SponsorAddInput {
name: String!
image: String
clientMutationId: String
}
type SponsorAddPayload {
sponsorEdge: SponsorEdge
error: String
clientMutationId: String
}
"""An edge in a connection."""
type SponsorEdge {
"""The item at the end of the edge"""
node: Sponsor!
"""A cursor for use in pagination"""
cursor: String!
}
"""Status"""
type Status {
"""Confy environment"""
env: String
"""Server build version"""
version: String
"""Server commit sha"""
commitSha: String
}
input style {
primaryText: String
secondaryText: String
primaryBackground: String
secondaryBackground: String
primaryAccent: String
secondaryAccent: String
}
"""TaxId"""
type TaxId {
"""TaxId"""
taxId: String
"""TaxId type"""
type: String
}
"""TaxId"""
input TaxIdInputType {
"""TaxId type"""
type: String
"""TaxId string/number"""
taxId: String!
}
"""Represents User"""
type User implements Node {
"""The ID of an object"""
id: ID!
"""MongoDB _id"""
_id: String!
"""User name resolver"""
name: String
"""User email resolver"""
email: String
"""List of emails of this user"""
emails: [UserEmail]!
"""Profile image of this user. It returns the newest one."""
profileImage: ProfileImage
"""Profile images of this user"""
profileImages: [File]
"""Cover image of this user. It returns the newest one."""
coverImage: File
"""Cover images of the profile of this user"""
coverImages: [File]
"""User mobile number resolver"""
mobileNumber: String
"""User occupation resolver"""
occupation: String
"""User position resolver"""
position: String
"""User taxId resolver"""
taxId: TaxId
isActive: Boolean
removedAt: String
createdAt: String
updatedAt: String
hasAttended(event: ID!): Boolean
"""Whether this user has liked this event or not"""
hasLiked(event: ID!): Boolean
organizations(after: String, first: Int, before: String, last: Int, search: String, filters: OrganizationFilters): OrganizationConnection!
roles(organization: ID!, user: ID): [String]
positionInQueue(event: ID!): Int
myEvents(after: String, first: Int, before: String, last: Int, search: String, filters: EventFilters): EventConnection!
likedEvents(after: String, first: Int, before: String, last: Int): EventConnection!
eventUser(event: ID!): EventUser
"""Connection to all notifications sent to this user."""
notifications(after: String, first: Int, before: String, last: Int): UserNotificationConnection!
"""
Just a notification counter. Hope we dont have endless notification badge Facebook bug.
"""
unreadNotificationsCount(source: UserNotificationsSourceEnum): Int!
"""Connection to all tickets from this user"""
tickets(after: String, first: Int, before: String, last: Int, filters: EventTicketUserFilters): EventTicketUserConnection!
lang: String
}
input UserAddInput {
name: String!
surname: String
password: String
email: String!
isActive: Boolean
taxId: TaxIdInputType
lang: String
clientMutationId: String
}
type UserAddPayload {
me: User
userEdge: UserEdge
error: String
token: String
clientMutationId: String
}
"""A connection to a list of items."""
type UserConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [UserEdge]!
}
"""An edge in a connection."""
type UserEdge {
"""The item at the end of the edge"""
node: User!
"""A cursor for use in pagination"""
cursor: String!
}
input UserEditCoverImageInput {
"""File path at google storage"""
url: String!
"""File type at google storage"""
mimeType: String
clientMutationId: String
}
type UserEditCoverImagePayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
input UserEditInput {
id: ID!
name: String
email: String
mobileNumber: String
occupation: String
position: String
taxId: TaxIdInputType
lang: String
clientMutationId: String
}
type UserEditPayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
input UserEditProfileImageInput {
"""File path at google storage"""
url: String!
"""File type at google storage"""
mimeType: String
clientMutationId: String
}
type UserEditProfileImagePayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
"""User email and verification status"""
type UserEmail {
email: String
wasVerified: Boolean
}
input UserEmailConfirmationInput {
token: String!
clientMutationId: String
}
type UserEmailConfirmationPayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
input UserEventLikeAddInput {
event: ID!
clientMutationId: String
}
type UserEventLikeAddPayload {
userEdge: UserEdge
eventEdge: EventEdge
event: Event
error: String
clientMutationId: String
}
input UserForgotPasswordInput {
email: String!
clientMutationId: String
}
type UserForgotPasswordPayload {
me: User
error: String
token: String
clientMutationId: String
}
input UserLoginInput {
email: String!
password: String!
clientMutationId: String
}
type UserLoginPayload {
me: User
token: String
error: String
clientMutationId: String
}
input UserLogoutInput {
id: ID!
clientMutationId: String
}
type UserLogoutPayload {
me: User
clientMutationId: String
}
"""Represents UserNotification"""
type UserNotification implements Node {
"""The ID of an object"""
id: ID!
"""User that will receive this push"""
user: User
"""User that executed the event that fired this notification"""
triggeredBy: User
"""The title of the notification"""
title: String
"""The body of the notification"""
body: String
"""
Notification type. Represents a path name, which will be converted into a url along side params
"""
type: String!
"""Notification params to be used with type during path builder"""
params: [Parameter]!
"""Notification based on type"""
routeName: String
"""event name for firebase analytics"""
firebaseAnalytics: String
"""when this notification was sent"""
sentAt: String
"""when this notification was opened on web"""
openedAtWeb: String
"""when this notification was opened on app"""
openedAtApp: String
"""if this notification was read"""
wasRead: Boolean!
createdAt: String
updatedAt: String
}
"""A connection to a list of items."""
type UserNotificationConnection {
"""Number of items in this connection"""
count: Int!
"""
A count of the total number of objects in this connection, ignoring pagination.
This allows a client to fetch the first five objects by passing "5" as the
argument to "first", then fetch the total count so it could display "5 of 83",
for example.
"""
totalCount: Int!
"""Offset from start"""
startCursorOffset: Int!
"""Offset till end"""
endCursorOffset: Int!
"""Information to aid in pagination."""
pageInfo: PageInfoExtended!
"""A list of edges."""
edges: [UserNotificationEdge]!
}
"""An edge in a connection."""
type UserNotificationEdge {
"""The item at the end of the edge"""
node: UserNotification
"""A cursor for use in pagination"""
cursor: String!
}
input UserNotificationMarkAllAsOpenedInput {
source: UserNotificationsSourceEnum!
clientMutationId: String
}
type UserNotificationMarkAllAsOpenedPayload {
me: User
error: String
clientMutationId: String
}
input UserNotificationMarkAllAsReadInput {
source: UserNotificationsSourceEnum!
clientMutationId: String
}
type UserNotificationMarkAllAsReadPayload {
me: User
error: String
clientMutationId: String
}
input UserNotificationMarkAsReadInput {
id: ID!
source: UserNotificationsSourceEnum!
clientMutationId: String
}
type UserNotificationMarkAsReadPayload {
userNotificationEdge: UserNotificationEdge
me: User
error: String
clientMutationId: String
}
enum UserNotificationsSourceEnum {
APP
WEB
}
input UserResetPasswordInput {
token: String!
password: String!
clientMutationId: String
}
type UserResetPasswordPayload {
me: User
userEdge: UserEdge
error: String
clientMutationId: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment