Created
October 2, 2017 16:56
-
-
Save gc-codesnippets/cc487a35a39f59e6b7cb383734217050 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
input CreatePost { | |
imageUrl: String! | |
title: String! | |
} | |
type Mutation { | |
createPost(imageUrl: String!, title: String!): Post | |
updatePost(id: ID!, imageUrl: String, title: String): Post | |
updateOrCreatePost(update: UpdatePost!, create: CreatePost!): Post | |
deletePost(id: ID!): Post | |
} | |
# An object with an ID | |
interface Node { | |
# The id of the object. | |
id: ID! | |
} | |
type Post implements Node { | |
id: ID! | |
imageUrl: String! | |
title: String! | |
} | |
input PostFilter { | |
# Logical AND on all given filters. | |
AND: [PostFilter!] | |
# Logical OR on all given filters. | |
OR: [PostFilter!] | |
id: ID | |
# All values that are not equal to given value. | |
id_not: ID | |
# All values that are contained in given list. | |
id_in: [ID!] | |
# All values that are not contained in given list. | |
id_not_in: [ID!] | |
# All values less than the given value. | |
id_lt: ID | |
# All values less than or equal the given value. | |
id_lte: ID | |
# All values greater than the given value. | |
id_gt: ID | |
# All values greater than or equal the given value. | |
id_gte: ID | |
# All values containing the given string. | |
id_contains: ID | |
# All values not containing the given string. | |
id_not_contains: ID | |
# All values starting with the given string. | |
id_starts_with: ID | |
# All values not starting with the given string. | |
id_not_starts_with: ID | |
# All values ending with the given string. | |
id_ends_with: ID | |
# All values not ending with the given string. | |
id_not_ends_with: ID | |
imageUrl: String | |
# All values that are not equal to given value. | |
imageUrl_not: String | |
# All values that are contained in given list. | |
imageUrl_in: [String!] | |
# All values that are not contained in given list. | |
imageUrl_not_in: [String!] | |
# All values less than the given value. | |
imageUrl_lt: String | |
# All values less than or equal the given value. | |
imageUrl_lte: String | |
# All values greater than the given value. | |
imageUrl_gt: String | |
# All values greater than or equal the given value. | |
imageUrl_gte: String | |
# All values containing the given string. | |
imageUrl_contains: String | |
# All values not containing the given string. | |
imageUrl_not_contains: String | |
# All values starting with the given string. | |
imageUrl_starts_with: String | |
# All values not starting with the given string. | |
imageUrl_not_starts_with: String | |
# All values ending with the given string. | |
imageUrl_ends_with: String | |
# All values not ending with the given string. | |
imageUrl_not_ends_with: String | |
title: String | |
# All values that are not equal to given value. | |
title_not: String | |
# All values that are contained in given list. | |
title_in: [String!] | |
# All values that are not contained in given list. | |
title_not_in: [String!] | |
# All values less than the given value. | |
title_lt: String | |
# All values less than or equal the given value. | |
title_lte: String | |
# All values greater than the given value. | |
title_gt: String | |
# All values greater than or equal the given value. | |
title_gte: String | |
# All values containing the given string. | |
title_contains: String | |
# All values not containing the given string. | |
title_not_contains: String | |
# All values starting with the given string. | |
title_starts_with: String | |
# All values not starting with the given string. | |
title_not_starts_with: String | |
# All values ending with the given string. | |
title_ends_with: String | |
# All values not ending with the given string. | |
title_not_ends_with: String | |
} | |
enum PostOrderBy { | |
id_ASC | |
id_DESC | |
imageUrl_ASC | |
imageUrl_DESC | |
title_ASC | |
title_DESC | |
} | |
type PostPreviousValues { | |
id: ID! | |
imageUrl: String! | |
title: String! | |
} | |
input PostSubscriptionFilter { | |
# Logical AND on all given filters. | |
AND: [PostSubscriptionFilter!] | |
# Logical OR on all given filters. | |
OR: [PostSubscriptionFilter!] | |
# The subscription event gets dispatched when it's listed in mutation_in | |
mutation_in: [_ModelMutationType!] | |
# The subscription event gets only dispatched when one of the updated fields names is included in this list | |
updatedFields_contains: String | |
# The subscription event gets only dispatched when all of the field names included in this list have been updated | |
updatedFields_contains_every: [String!] | |
# The subscription event gets only dispatched when some of the field names included in this list have been updated | |
updatedFields_contains_some: [String!] | |
node: PostSubscriptionFilterNode | |
} | |
input PostSubscriptionFilterNode { | |
id: ID | |
# All values that are not equal to given value. | |
id_not: ID | |
# All values that are contained in given list. | |
id_in: [ID!] | |
# All values that are not contained in given list. | |
id_not_in: [ID!] | |
# All values less than the given value. | |
id_lt: ID | |
# All values less than or equal the given value. | |
id_lte: ID | |
# All values greater than the given value. | |
id_gt: ID | |
# All values greater than or equal the given value. | |
id_gte: ID | |
# All values containing the given string. | |
id_contains: ID | |
# All values not containing the given string. | |
id_not_contains: ID | |
# All values starting with the given string. | |
id_starts_with: ID | |
# All values not starting with the given string. | |
id_not_starts_with: ID | |
# All values ending with the given string. | |
id_ends_with: ID | |
# All values not ending with the given string. | |
id_not_ends_with: ID | |
imageUrl: String | |
# All values that are not equal to given value. | |
imageUrl_not: String | |
# All values that are contained in given list. | |
imageUrl_in: [String!] | |
# All values that are not contained in given list. | |
imageUrl_not_in: [String!] | |
# All values less than the given value. | |
imageUrl_lt: String | |
# All values less than or equal the given value. | |
imageUrl_lte: String | |
# All values greater than the given value. | |
imageUrl_gt: String | |
# All values greater than or equal the given value. | |
imageUrl_gte: String | |
# All values containing the given string. | |
imageUrl_contains: String | |
# All values not containing the given string. | |
imageUrl_not_contains: String | |
# All values starting with the given string. | |
imageUrl_starts_with: String | |
# All values not starting with the given string. | |
imageUrl_not_starts_with: String | |
# All values ending with the given string. | |
imageUrl_ends_with: String | |
# All values not ending with the given string. | |
imageUrl_not_ends_with: String | |
title: String | |
# All values that are not equal to given value. | |
title_not: String | |
# All values that are contained in given list. | |
title_in: [String!] | |
# All values that are not contained in given list. | |
title_not_in: [String!] | |
# All values less than the given value. | |
title_lt: String | |
# All values less than or equal the given value. | |
title_lte: String | |
# All values greater than the given value. | |
title_gt: String | |
# All values greater than or equal the given value. | |
title_gte: String | |
# All values containing the given string. | |
title_contains: String | |
# All values not containing the given string. | |
title_not_contains: String | |
# All values starting with the given string. | |
title_starts_with: String | |
# All values not starting with the given string. | |
title_not_starts_with: String | |
# All values ending with the given string. | |
title_ends_with: String | |
# All values not ending with the given string. | |
title_not_ends_with: String | |
} | |
type PostSubscriptionPayload { | |
mutation: _ModelMutationType! | |
node: Post | |
updatedFields: [String!] | |
previousValues: PostPreviousValues | |
} | |
type Query { | |
allPosts(filter: PostFilter, orderBy: PostOrderBy, skip: Int, after: String, before: String, first: Int, last: Int): [Post!]! | |
_allPostsMeta(filter: PostFilter, orderBy: PostOrderBy, skip: Int, after: String, before: String, first: Int, last: Int): _QueryMeta! | |
Post(id: ID): Post | |
# Fetches an object given its ID | |
node( | |
# The ID of an object | |
id: ID! | |
): Node | |
} | |
type Subscription { | |
Post(filter: PostSubscriptionFilter): PostSubscriptionPayload | |
} | |
input UpdatePost { | |
id: ID! | |
imageUrl: String | |
title: String | |
} | |
enum _ModelMutationType { | |
CREATED | |
UPDATED | |
DELETED | |
} | |
# Meta information about the query. | |
type _QueryMeta { | |
count: Int! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment