-
-
Save misterhtmlcss/67220bac559ad1a69bfeee3b670deb08 to your computer and use it in GitHub Desktop.
This file contains 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
directive @embedded on OBJECT | |
directive @collection(name: String!) on OBJECT | |
directive @index(name: String!) on FIELD_DEFINITION | |
directive @resolver( | |
name: String | |
paginated: Boolean! = false | |
) on FIELD_DEFINITION | |
directive @relation(name: String) on FIELD_DEFINITION | |
directive @unique(index: String) on FIELD_DEFINITION | |
scalar Date | |
# The `Long` scalar type | |
represents non-fractional signed whole numeric values. | |
# Long can represent values between -(2^63) and 2^63 - 1. | |
scalar Long | |
type Mutation { | |
# Create a new document in the collection of 'Post' | |
createPost( | |
# 'Post' input values | |
data: PostInput! | |
): Post! | |
# Update an existing document in the collection of 'Post' | |
updatePost( | |
# The 'Post' document's ID | |
id: ID! | |
# 'Post' input values | |
data: PostInput! | |
): Post | |
# Delete an existing document in the collection of 'Post' | |
deletePost( | |
# The 'Post' document's ID | |
id: ID! | |
): Post | |
} | |
type Post { | |
# The document's ID. | |
_id: ID! | |
# The document's timestamp. | |
_ts: Long! | |
title: String | |
} | |
# 'Post' input values | |
input PostInput { | |
title: String | |
} | |
# The pagination object for elements of type 'Post'. | |
type PostPage { | |
# The elements of type 'Post' in this page. | |
data: [Post]! | |
# A cursor for elements coming after the current page. | |
after: String | |
# A cursor for elements coming before the current page. | |
before: String | |
} | |
type Query { | |
# Find a document from the collection of 'Post' by its id. | |
findPostByID( | |
# The 'Post' document's ID | |
id: ID! | |
): Post | |
posts( | |
# The number of items to return per page. | |
_size: Int | |
# The pagination cursor. | |
_cursor: String | |
): PostPage! | |
} | |
scalar Time | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment