246 lines
4.0 KiB
GraphQL
246 lines
4.0 KiB
GraphQL
### This file was generated by Nexus Schema
|
|
### Do not make changes to this file directly
|
|
|
|
"""
|
|
A comment about an entry, submitted by a user
|
|
"""
|
|
type Comment {
|
|
"""
|
|
The text of the comment
|
|
"""
|
|
content: String
|
|
|
|
"""
|
|
A timestamp of when the comment was posted
|
|
"""
|
|
createdAt: Float
|
|
|
|
"""
|
|
The SQL ID of this entry
|
|
"""
|
|
id: Int
|
|
|
|
"""
|
|
The GitHub user who posted the comment
|
|
"""
|
|
postedBy: User
|
|
|
|
"""
|
|
The repository which this comment is about
|
|
"""
|
|
repoName: String
|
|
}
|
|
|
|
type Entry {
|
|
"""
|
|
The number of comments posted about this repository
|
|
"""
|
|
commentCount: Int
|
|
|
|
"""
|
|
Comments posted about this repository
|
|
"""
|
|
comments(limit: Int, offset: Int): [Comment]
|
|
|
|
"""
|
|
A timestamp of when the entry was submitted
|
|
"""
|
|
createdAt: Float
|
|
|
|
"""
|
|
The hot score of this repository
|
|
"""
|
|
hotScore: Float
|
|
|
|
"""
|
|
The SQL ID of this entry
|
|
"""
|
|
id: Int
|
|
|
|
"""
|
|
The GitHub user who posted the comment
|
|
"""
|
|
postedBy: User
|
|
|
|
"""
|
|
Information about the repository from GitHub
|
|
"""
|
|
repository: Repository
|
|
|
|
"""
|
|
The score of this repository, upvotes - downvotes
|
|
"""
|
|
score: Int
|
|
|
|
"""
|
|
XXX to be changed
|
|
"""
|
|
vote: Vote
|
|
}
|
|
|
|
"""
|
|
A list of options for the sort order of the feed
|
|
"""
|
|
enum FeedType {
|
|
"""
|
|
Sort by a combination of freshness and score, using Reddit's algorithm
|
|
"""
|
|
HOT
|
|
|
|
"""
|
|
Newest entries first
|
|
"""
|
|
NEW
|
|
|
|
"""
|
|
Highest score entries first
|
|
"""
|
|
TOP
|
|
}
|
|
|
|
type Mutation {
|
|
submitComment(
|
|
"""
|
|
The text content for the new comment
|
|
"""
|
|
commentContent: String!
|
|
|
|
"""
|
|
The full repository name from GitHub, e.g. "apollostack/GitHunt-API"
|
|
"""
|
|
repoFullName: String!
|
|
): Comment
|
|
|
|
"""
|
|
Submit a new repository, returns the new submission
|
|
"""
|
|
submitRepository(
|
|
"""
|
|
The full repository name from GitHub, e.g. "apollostack/GitHunt-API"
|
|
"""
|
|
repoFullName: String!
|
|
): Entry
|
|
|
|
"""
|
|
Vote on a repository submission, returns the submission that was voted on
|
|
"""
|
|
vote(
|
|
"""
|
|
The full repository name from GitHub, e.g. "apollostack/GitHunt-API"
|
|
"""
|
|
repoFullName: String!
|
|
|
|
"""
|
|
The type of vote - UP, DOWN, or CANCEL
|
|
"""
|
|
type: VoteType!
|
|
): Entry
|
|
}
|
|
|
|
type Query {
|
|
"""
|
|
Return the currently logged in user, or null if nobody is logged in
|
|
"""
|
|
currentUser: User
|
|
|
|
"""
|
|
A single entry
|
|
"""
|
|
entry(
|
|
"""
|
|
The full repository name from GitHub, e.g. "apollostack/GitHunt-API"
|
|
"""
|
|
repoFullName: String!
|
|
): Entry
|
|
feed(
|
|
"""
|
|
The number of items to fetch starting from the offset, for pagination
|
|
"""
|
|
limit: Int
|
|
|
|
"""
|
|
The number of items to skip, for pagination
|
|
"""
|
|
offset: Int
|
|
|
|
"""
|
|
The sort order for the feed
|
|
"""
|
|
type: FeedType!
|
|
): [Entry]
|
|
}
|
|
|
|
"""
|
|
A repository object from the GitHub API. This uses the exact field names returned by the
|
|
GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
|
|
"""
|
|
type Repository {
|
|
"""
|
|
The description of the repository
|
|
"""
|
|
description: String
|
|
|
|
"""
|
|
The full name of the repository with the username, e.g. apollostack/GitHunt-API
|
|
"""
|
|
full_name: String
|
|
|
|
"""
|
|
The link to the repository on GitHub
|
|
"""
|
|
html_url: String
|
|
|
|
"""
|
|
Just the name of the repository, e.g. GitHunt-API
|
|
"""
|
|
name: String
|
|
|
|
"""
|
|
The number of open issues on this repository on GitHub
|
|
"""
|
|
open_issues_count: Int
|
|
|
|
"""
|
|
The owner of this repository on GitHub, e.g. apollostack
|
|
"""
|
|
owner: User
|
|
|
|
"""
|
|
The number of people who have starred this repository on GitHub
|
|
"""
|
|
stargazers_count: Int
|
|
}
|
|
|
|
"""
|
|
A user object from the GitHub API. This uses the exact field names returned from the GitHub API.
|
|
"""
|
|
type User {
|
|
"""
|
|
The URL to a directly embeddable image for this user's avatar
|
|
"""
|
|
avatar_url: String
|
|
|
|
"""
|
|
The URL of this user's GitHub page
|
|
"""
|
|
html_url: String
|
|
|
|
"""
|
|
The name of the user, e.g. apollostack
|
|
"""
|
|
login: String
|
|
}
|
|
|
|
type Vote {
|
|
vote_value: Int
|
|
}
|
|
|
|
"""
|
|
The type of vote to record, when submitting a vote
|
|
"""
|
|
enum VoteType {
|
|
CANCEL
|
|
DOWN
|
|
UP
|
|
}
|