-
-
Save gHashTag/618b169d7178db0aff7be183c0196880 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default` | |
scalar Date | |
type Status { | |
message: String! | |
} | |
type Auth { | |
token: String! | |
} | |
type User { | |
_id: ID! | |
username: String | |
email: String! | |
firstName: String | |
lastName: String | |
avatar: String | |
createdAt: Date! | |
updatedAt: Date! | |
} | |
type EventTimes { | |
start_time: Date! | |
end_time: Date! | |
} | |
type Me { | |
_id: ID! | |
username: String | |
email: String! | |
firstName: String | |
lastName: String | |
avatar: String | |
createdAt: Date! | |
updatedAt: Date! | |
} | |
type Event { | |
_id: ID! | |
name: String! | |
teacher: String! | |
cover: String | |
description: String | |
start_time: String | |
end_time: String | |
event_times: [EventTimes] | |
createdAt: Date! | |
updatedAt: Date! | |
} | |
type Tweet { | |
_id: ID | |
text: String! | |
user: User! | |
favoriteCount: Int! | |
createdAt: Date! | |
updatedAt: Date! | |
} | |
type Query { | |
getTweet(_id: ID!): Tweet | |
getEvent(_id: ID!): Event | |
getTweets: [Tweet] | |
getEvents: [Event] | |
getUserTweets: [Tweet] | |
me: Me | |
} | |
type Mutation { | |
createTweet(text: String!): Tweet | |
createEvent(name: String!, teacher: String!, cover: String, description: String, start_time: String, end_time: String ): Event | |
updateTweet(_id: ID!, text: String!): Tweet | |
updateEvent(_id: ID!, name: String!, teacher: String, cover: String, description: String, start_time: String, end_time: String): Event | |
deleteTweet(_id: ID!): Status | |
deleteEvent(_id: ID!): Status | |
signup(email: String!, fullName: String!, password: String!, avatar: String, username: String): Auth | |
login(email: String!, password: String!): Auth | |
} | |
schema { | |
query: Query | |
mutation: Mutation | |
} | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment