Skip to content

Instantly share code, notes, and snippets.

@johnymontana
Created December 21, 2018 05:25
Show Gist options
  • Save johnymontana/5d421e542bd4652f77f41fa4fbbcded2 to your computer and use it in GitHub Desktop.
Save johnymontana/5d421e542bd4652f77f41fa4fbbcded2 to your computer and use it in GitHub Desktop.
type Repository {
url: ID!
created_at: DateTime
description: String
name: String
website: String
webhooks: [Webhook] @relation(name: "HAS_WEBHOOK", direction: "OUT")
pull_requests: [PullRequest] @relation(name: "BASE", direction: "IN")
pr_count: Int @cypher(statement: "RETURN SIZE((this)<-[:BASE]-())")
}
type PullRequest {
url: ID!
title: String
created_at: DateTime
body: String
head: [Repository] @relation(name: "HEAD", direction: "IN")
base: [Repository] @relation(name: "BASE", direction: "IN")
user: User @relation(name: "OPENS", direction: "IN")
}
type User {
url: ID!
created_at: DateTime
company: String
location: String
name: String
login: String
bio: String
repositories: [Repository] @relation(name: "OWNS", direction: "OUT")
pull_requests: [PullRequest] @relation(name: "OPENS", direction: "OUT")
}
type Webhook {
url: ID!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment