type Query {
User: UserQueries
Tweet: TweetQueries
}
type Mutation {
User: UserMutations
Tweet: TweetMutations
}
input ArrayAggInput {
filter: [ArrayFilter!]
orderBy: OrderByInput
from: Int
to: Int
}
input ArrayFilter {
predicate: ArrayPredicate!
and: [ArrayFilter!]
or: [ArrayFilter!]
negated: Boolean
}
input BooleanAggInput {
filter: [BooleanFilter!]
orderBy: OrderByInput
from: Int
to: Int
}
input BooleanFilter {
predicate: BooleanPredicate!
and: [BooleanFilter!]
or: [BooleanFilter!]
negated: Boolean
}
input FloatAggInput {
filter: [FloatFilter!]
orderBy: OrderByInput
from: Int
to: Int
}
input FloatFilter {
predicate: FloatPredicate!
and: [FloatFilter!]
or: [FloatFilter!]
negated: Boolean
}
input FloatPredicate {
lt: Float
gt: Float
eq: Float
gte: Float
lte: Float
}
input IntAggInput {
filter: [IntFilter!]
orderBy: OrderByInput
from: Int
to: Int
}
input IntFilter {
predicate: IntPredicate!
and: [IntFilter!]
or: [IntFilter!]
negated: Boolean
}
input StringAggInput {
filter: [StringFilter!]
orderBy: OrderByInput
from: Int
to: Int
}
input StringFilter {
predicate: StringPredicate!
and: [StringFilter!]
or: [StringFilter!]
negated: Boolean
}
input TweetInput {
id: String
user: UserInput
content: String
likes: [UserInput!]
retweets: [UserInput!]
replies: [TweetInput!]
}
type TweetMutations {
create(tweet: TweetInput!): Tweet!
update(id: String!, tweet: TweetInput!): Tweet!
delete(id: String!): Tweet!
createMany(items: [TweetInput!]!): [Tweet!]!
updateMany(items: [TweetInput!]!): [Tweet!]!
deleteMany(items: [String!]!): [Tweet!]!
pushToLikes(id: String!, item: UserInput!): User!
pushManyToLikes(id: String!, items: [UserInput!]!): [User!]!
removeFromLikes(id: String!, item: String!): User!
removeManyFromLikes(id: String!, filter: UserFilter!): [User!]!
pushToRetweets(id: String!, item: UserInput!): User!
pushManyToRetweets(id: String!, items: [UserInput!]!): [User!]!
removeFromRetweets(id: String!, item: String!): User!
removeManyFromRetweets(id: String!, filter: UserFilter!): [User!]!
pushToReplies(id: String!, item: TweetInput!): Tweet!
pushManyToReplies(id: String!, items: [TweetInput!]!): [Tweet!]!
removeFromReplies(id: String!, item: String!): Tweet!
removeManyFromReplies(id: String!, filter: TweetFilter!): [Tweet!]!
}
input UserInput {
username: String
password: String
name: String
avatarUrl: String
coverUrl: String
bio: String
isVerified: Boolean
followers: [UserInput!]
following: [UserInput!]
tweets: [TweetInput!]
retweets: [TweetInput!]
likes: [TweetInput!]
}
type UserMutations {
create(user: UserInput!): User!
update(username: String!, user: UserInput!): User!
delete(username: String!): User!
createMany(items: [UserInput!]!): [User!]!
updateMany(items: [UserInput!]!): [User!]!
deleteMany(items: [String!]!): [User!]!
pushToFollowers(username: String!, item: UserInput!): User!
pushManyToFollowers(username: String!, items: [UserInput!]!): [User!]!
removeFromFollowers(username: String!, item: String!): User!
removeManyFromFollowers(username: String!, filter: UserFilter!): [User!]!
pushToFollowing(username: String!, item: UserInput!): User!
pushManyToFollowing(username: String!, items: [UserInput!]!): [User!]!
removeFromFollowing(username: String!, item: String!): User!
removeManyFromFollowing(username: String!, filter: UserFilter!): [User!]!
pushToTweets(username: String!, item: TweetInput!): Tweet!
pushManyToTweets(username: String!, items: [TweetInput!]!): [Tweet!]!
removeFromTweets(username: String!, item: String!): Tweet!
removeManyFromTweets(username: String!, filter: TweetFilter!): [Tweet!]!
pushToRetweets(username: String!, item: TweetInput!): Tweet!
pushManyToRetweets(username: String!, items: [TweetInput!]!): [Tweet!]!
removeFromRetweets(username: String!, item: String!): Tweet!
removeManyFromRetweets(username: String!, filter: TweetFilter!): [Tweet!]!
pushToLikes(username: String!, item: TweetInput!): Tweet!
pushManyToLikes(username: String!, items: [TweetInput!]!): [Tweet!]!
removeFromLikes(username: String!, item: String!): Tweet!
removeManyFromLikes(username: String!, filter: TweetFilter!): [Tweet!]!
loginByUsername(username: String!, password: String!): String!
}
input ArrayPredicate {
length: IntPredicate
}
input BooleanPredicate {
eq: Boolean
}
input IntPredicate {
lt: Int
gt: Int
eq: Int
gte: Int
lte: Int
}
input OrderByInput {
field: String!
order: OrderEnum
}
enum OrderEnum {
DESC
ASC
}
input StringPredicate {
length: IntPredicate
startsWith: String
endsWith: String
pattern: String
eq: String
}
type Tweet {
id: String!
user: User!
content: String!
likes(aggregation: UserAggInput): [User!]!
retweets(aggregation: UserAggInput): [User!]!
replies(aggregation: TweetAggInput): [Tweet!]!
}
input TweetAggInput {
filter: [TweetFilter!]
from: Int
to: Int
orderBy: OrderByInput
}
input TweetFilter {
predicate: TweetPredicate!
and: [TweetFilter!]
or: [TweetFilter!]
negated: Boolean
}
input TweetPredicate {
id: StringPredicate
user: UserPredicate
content: StringPredicate
likes: ArrayPredicate
retweets: ArrayPredicate
replies: ArrayPredicate
}
type TweetQueries {
read(id: String!): Tweet
list(aggregation: TweetAggInput): [Tweet!]!
}
type User {
username: String!
name: String!
avatarUrl: String!
coverUrl: String
bio: String
isVerified: Boolean
followers(aggregation: UserAggInput): [User!]!
following(aggregation: UserAggInput): [User!]!
tweets(aggregation: TweetAggInput): [Tweet!]!
retweets(aggregation: TweetAggInput): [Tweet!]!
likes(aggregation: TweetAggInput): [Tweet!]!
}
input UserAggInput {
filter: [UserFilter!]
from: Int
to: Int
orderBy: OrderByInput
}
input UserFilter {
predicate: UserPredicate!
and: [UserFilter!]
or: [UserFilter!]
negated: Boolean
}
input UserPredicate {
username: StringPredicate
name: StringPredicate
avatarUrl: StringPredicate
coverUrl: StringPredicate
bio: StringPredicate
isVerified: BooleanPredicate
followers: ArrayPredicate
following: ArrayPredicate
tweets: ArrayPredicate
retweets: ArrayPredicate
likes: ArrayPredicate
}
type UserQueries {
read(username: String!): User
list(aggregation: UserAggInput): [User!]!
}