Skip to content

Instantly share code, notes, and snippets.

@AndrewIngram
Last active January 7, 2021 11:05
Show Gist options
  • Save AndrewIngram/4aa189ccf192cb48a2be9d16b628218d to your computer and use it in GitHub Desktop.
Save AndrewIngram/4aa189ccf192cb48a2be9d16b628218d to your computer and use it in GitHub Desktop.
Derived Dribbble Scema
# Not everything is defined here, just what was mentioned in the article
type User {
id: ID!
name: String!
avatar: Image!
isPro: Boolean!
viewerHasFollowed: Boolean!
shots(exclude: ID): ShotConnection!
}
enum CommentOrdering {
OLDEST_FIRST
NEWEST_FIRST
MOST_LIKED_FIRST
}
type Comment {
id: ID!
author: User!
content: HTML!
shot: Shot! # For completeness, not strictly needed
submittedAt: DateTime!
numLikes: Int!
viewerHasLiked: Boolean!
likedBy: UserConnection!
}
type Shot {
id: ID!
title: String!
description: HTML!
postedAt: DateTime!
image: Image!
createdBy: User!
commissionedBy: User
tags: [Tag!]!
colors: [Color!]!
viewerHasLiked: Boolean!
viewerHasSaved: Boolean!
numComments: Int!
numLikes: Int!
numSaves: Int!
comments(orderBy: CommentOrdering = OLDEST_FIRST): CommentConnection!
likedBy: UserConnection!
savedIn: CollectionConnection!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment