Created
May 12, 2018 13:14
-
-
Save gc-codesnippets/e858736dc7e86bae1cf609d24d663e63 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
# source: https://eu1.prisma.sh/nikolas/fduivg/dev | |
# timestamp: Sat May 12 2018 15:13:56 GMT+0200 (CEST) | |
type AggregateUser { | |
count: Int! | |
} | |
type BatchPayload { | |
"""The number of nodes that have been affected by the Batch operation.""" | |
count: Long! | |
} | |
scalar DateTime | |
""" | |
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 { | |
createUser(data: UserCreateInput!): User! | |
updateUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User | |
deleteUser(where: UserWhereUniqueInput!): User | |
upsertUser(where: UserWhereUniqueInput!, create: UserCreateInput!, update: UserUpdateInput!): User! | |
updateManyUsers(data: UserUpdateInput!, where: UserWhereInput): BatchPayload! | |
deleteManyUsers(where: UserWhereInput): BatchPayload! | |
} | |
enum MutationType { | |
CREATED | |
UPDATED | |
DELETED | |
} | |
"""An object with an ID""" | |
interface Node { | |
"""The id of the object.""" | |
id: ID! | |
} | |
"""Information about pagination in a connection.""" | |
type PageInfo { | |
"""When paginating forwards, are there more items?""" | |
hasNextPage: Boolean! | |
"""When paginating backwards, are there more items?""" | |
hasPreviousPage: Boolean! | |
"""When paginating backwards, the cursor to continue.""" | |
startCursor: String | |
"""When paginating forwards, the cursor to continue.""" | |
endCursor: String | |
} | |
type Query { | |
users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User]! | |
user(where: UserWhereUniqueInput!): User | |
usersConnection(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): UserConnection! | |
"""Fetches an object given its ID""" | |
node( | |
"""The ID of an object""" | |
id: ID! | |
): Node | |
} | |
type Subscription { | |
user(where: UserSubscriptionWhereInput): UserSubscriptionPayload | |
} | |
type User implements Node { | |
id: ID! | |
createdAt: DateTime! | |
name: String! | |
isAdmin: Boolean! | |
} | |
"""A connection to a list of items.""" | |
type UserConnection { | |
"""Information to aid in pagination.""" | |
pageInfo: PageInfo! | |
"""A list of edges.""" | |
edges: [UserEdge]! | |
aggregate: AggregateUser! | |
} | |
input UserCreateInput { | |
name: String! | |
isAdmin: Boolean! | |
} | |
"""An edge in a connection.""" | |
type UserEdge { | |
"""The item at the end of the edge.""" | |
node: User! | |
"""A cursor for use in pagination.""" | |
cursor: String! | |
} | |
enum UserOrderByInput { | |
id_ASC | |
id_DESC | |
createdAt_ASC | |
createdAt_DESC | |
name_ASC | |
name_DESC | |
isAdmin_ASC | |
isAdmin_DESC | |
updatedAt_ASC | |
updatedAt_DESC | |
} | |
type UserPreviousValues { | |
id: ID! | |
createdAt: DateTime! | |
name: String! | |
isAdmin: Boolean! | |
} | |
type UserSubscriptionPayload { | |
mutation: MutationType! | |
node: User | |
updatedFields: [String!] | |
previousValues: UserPreviousValues | |
} | |
input UserSubscriptionWhereInput { | |
"""Logical AND on all given filters.""" | |
AND: [UserSubscriptionWhereInput!] | |
"""Logical OR on all given filters.""" | |
OR: [UserSubscriptionWhereInput!] | |
"""Logical NOT on all given filters combined by AND.""" | |
NOT: [UserSubscriptionWhereInput!] | |
""" | |
The subscription event gets dispatched when it's listed in mutation_in | |
""" | |
mutation_in: [MutationType!] | |
""" | |
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: UserWhereInput | |
} | |
input UserUpdateInput { | |
name: String | |
isAdmin: Boolean | |
} | |
input UserWhereInput { | |
"""Logical AND on all given filters.""" | |
AND: [UserWhereInput!] | |
"""Logical OR on all given filters.""" | |
OR: [UserWhereInput!] | |
"""Logical NOT on all given filters combined by AND.""" | |
NOT: [UserWhereInput!] | |
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 | |
createdAt: DateTime | |
"""All values that are not equal to given value.""" | |
createdAt_not: DateTime | |
"""All values that are contained in given list.""" | |
createdAt_in: [DateTime!] | |
"""All values that are not contained in given list.""" | |
createdAt_not_in: [DateTime!] | |
"""All values less than the given value.""" | |
createdAt_lt: DateTime | |
"""All values less than or equal the given value.""" | |
createdAt_lte: DateTime | |
"""All values greater than the given value.""" | |
createdAt_gt: DateTime | |
"""All values greater than or equal the given value.""" | |
createdAt_gte: DateTime | |
name: String | |
"""All values that are not equal to given value.""" | |
name_not: String | |
"""All values that are contained in given list.""" | |
name_in: [String!] | |
"""All values that are not contained in given list.""" | |
name_not_in: [String!] | |
"""All values less than the given value.""" | |
name_lt: String | |
"""All values less than or equal the given value.""" | |
name_lte: String | |
"""All values greater than the given value.""" | |
name_gt: String | |
"""All values greater than or equal the given value.""" | |
name_gte: String | |
"""All values containing the given string.""" | |
name_contains: String | |
"""All values not containing the given string.""" | |
name_not_contains: String | |
"""All values starting with the given string.""" | |
name_starts_with: String | |
"""All values not starting with the given string.""" | |
name_not_starts_with: String | |
"""All values ending with the given string.""" | |
name_ends_with: String | |
"""All values not ending with the given string.""" | |
name_not_ends_with: String | |
isAdmin: Boolean | |
"""All values that are not equal to given value.""" | |
isAdmin_not: Boolean | |
} | |
input UserWhereUniqueInput { | |
id: ID | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment