Created
October 3, 2017 17:52
-
-
Save thomsbg/6f0e0526d1f7447c2475773f146e5b24 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fragment StoryData { | |
title: String | |
image: Image | |
body: RichText | |
... | |
} | |
enum StoryStatus { | |
DRAFT | |
PENDING_APPROVAL | |
APPROVED | |
EMBARGOED | |
} | |
type DraftStoryData { | |
...StoryData | |
status: StoryStatus | |
} | |
type PublicStoryData implements StoryData { | |
...StoryData | |
commentsClosed: Boolean | |
} | |
type Story { | |
id: Int | |
draft: DraftStoryData | |
public: PublicStoryData | |
} | |
type Query { | |
storyById(id: Int): Story | |
} | |
type Mutation { | |
publishStory(id: Int) | |
saveStoryDraft(id: Int, version: Int, patch: JSON0) | |
changeCommentsClosed(id: Int, closed: Boolean) | |
} | |
--- | |
storyById(id: 1234) { | |
draft { | |
title | |
} | |
public { | |
commentsClosed | |
} | |
} | |
saveStoryDraft(id: 1234, version: 2, patch: [{ p: ['title'], oi: 'New Title' }]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment