New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add User model using Prisma. #2

Merged
merged 1 commit into from Jun 25, 2018
Jump to file or symbol
Failed to load files and symbols.
+950 −0
Diff settings

Always

Just for now

Copy path View file
@@ -0,0 +1,6 @@
type User {
id: ID! @unique
username: String! @unique
stellarAccount: String!
stellarSeed: String!
}
Copy path View file
@@ -0,0 +1,344 @@
# source: https://us1.prisma.sh/public-gravelcloud-78/anchorx-api/dev
# timestamp: Mon Jun 25 2018 13:41:18 GMT-0500 (-05)

type AggregateUser {
count: Int!
}

type BatchPayload {
"""The number of nodes that have been affected by the Batch operation."""
count: Long!
}

"""
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!
username: String!
stellarAccount: String!
stellarSeed: String!
}

"""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 {
username: String!
stellarAccount: String!
stellarSeed: String!
}

"""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
username_ASC
username_DESC
stellarAccount_ASC
stellarAccount_DESC
stellarSeed_ASC
stellarSeed_DESC
updatedAt_ASC
updatedAt_DESC
createdAt_ASC
createdAt_DESC
}

type UserPreviousValues {
id: ID!
username: String!
stellarAccount: String!
stellarSeed: String!
}

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 {
username: String
stellarAccount: String
stellarSeed: String
}

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
username: String

"""All values that are not equal to given value."""
username_not: String

"""All values that are contained in given list."""
username_in: [String!]

"""All values that are not contained in given list."""
username_not_in: [String!]

"""All values less than the given value."""
username_lt: String

"""All values less than or equal the given value."""
username_lte: String

"""All values greater than the given value."""
username_gt: String

"""All values greater than or equal the given value."""
username_gte: String

"""All values containing the given string."""
username_contains: String

"""All values not containing the given string."""
username_not_contains: String

"""All values starting with the given string."""
username_starts_with: String

"""All values not starting with the given string."""
username_not_starts_with: String

"""All values ending with the given string."""
username_ends_with: String

"""All values not ending with the given string."""
username_not_ends_with: String
stellarAccount: String

"""All values that are not equal to given value."""
stellarAccount_not: String

"""All values that are contained in given list."""
stellarAccount_in: [String!]

"""All values that are not contained in given list."""
stellarAccount_not_in: [String!]

"""All values less than the given value."""
stellarAccount_lt: String

"""All values less than or equal the given value."""
stellarAccount_lte: String

"""All values greater than the given value."""
stellarAccount_gt: String

"""All values greater than or equal the given value."""
stellarAccount_gte: String

"""All values containing the given string."""
stellarAccount_contains: String

"""All values not containing the given string."""
stellarAccount_not_contains: String

"""All values starting with the given string."""
stellarAccount_starts_with: String

"""All values not starting with the given string."""
stellarAccount_not_starts_with: String

"""All values ending with the given string."""
stellarAccount_ends_with: String

"""All values not ending with the given string."""
stellarAccount_not_ends_with: String
stellarSeed: String

"""All values that are not equal to given value."""
stellarSeed_not: String

"""All values that are contained in given list."""
stellarSeed_in: [String!]

"""All values that are not contained in given list."""
stellarSeed_not_in: [String!]

"""All values less than the given value."""
stellarSeed_lt: String

"""All values less than or equal the given value."""
stellarSeed_lte: String

"""All values greater than the given value."""
stellarSeed_gt: String

"""All values greater than or equal the given value."""
stellarSeed_gte: String

"""All values containing the given string."""
stellarSeed_contains: String

"""All values not containing the given string."""
stellarSeed_not_contains: String

"""All values starting with the given string."""
stellarSeed_starts_with: String

"""All values not starting with the given string."""
stellarSeed_not_starts_with: String

"""All values ending with the given string."""
stellarSeed_ends_with: String

"""All values not ending with the given string."""
stellarSeed_not_ends_with: String
}

input UserWhereUniqueInput {
id: ID
username: String
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.