Skip to content

Instantly share code, notes, and snippets.

Last active January 7, 2021 11:05
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
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 {
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