Skip to content

Instantly share code, notes, and snippets.

@svnlto
Created April 10, 2017 06:22
Show Gist options
  • Save svnlto/13035964595dc6db66e6829957392230 to your computer and use it in GitHub Desktop.
Save svnlto/13035964595dc6db66e6829957392230 to your computer and use it in GitHub Desktop.
type CardLimits {
transaction: Int @examples(values: [123123, 123123123])
cash: Int @examples(values: [333333333, 123123123])
}
enum CardStatus {
PROCESSING,
ACTIVE,
INACTIVE,
BLOCK_PERMANENT,
BLOCK_TEMPORARY
}
enum BalanceType {
CR
DR
}
enum AccountLimits {
PURCHASE
WITHDRAW
}
enum TutorialsAvailable {
PAYMETutorial
PAYMEAccountSelectionTutorial
}
enum AccountType {
JENIUS
DREAMSAVER
}
type Tutorial {
hasCompleted: [TutorialsAvailable]
inProgress: Boolean
}
type Search {
id: Int!
query: String!
scope: String!
}
type Card {
id: Int!
balance: Int! @fake(type: money options: { minMoney: 1000000 })
name: String! @fake(type: financeAccountName, locale:id_ID)
alias: String @fake(type:companyName)
type: String @examples(values: ["X_CARD", "E_CARD", "M_CARD"])
status: CardStatus @examples(values: ["PROCESSING", "ACTIVE", "INACTIVE", "BLOCK_PERMANENT", "BLOCK_TEMPORARY"])
isVirtual: Boolean! @examples(values: [true, false])
isBlocked: Boolean! @examples(values: [true, false])
isRetired: Boolean! @examples(values: [true, false])
identifier: String
number: String @examples(values: [465812451351312, 465812451351282])
validFrom: String @fake(type: pastDate)
expiresAt: String @fake(type: futureDate)
pin: Int @examples(values: [1111, 7337, 173])
cvv: Int @examples(values: [231, 839, 213])
limits: CardLimits
account: Account
}
type Account {
id: Int!
number: String! @fake(type:internationalBankAccountNumber)
balance: Int! @fake(type: money options: { minMoney: 1000000 })
type: AccountType @examples(values: ["JENIUS", "DREAMSAVER"])
currency: String! @examples(values: ["GBP", "IDR"])
balanceType: BalanceType @examples(values: ["CR", "DR"])
cards: [Card]
}
type User {
id: ID!
email: String! @fake(type: email)
name: String! @fake(type: fullName, locale:id_ID)
emailVerified: Boolean @examples(values: [true, false])
avatar: String @fake(type: avatarUrl)
active: Boolean @examples(values: [true, false])
phone: String @fake(type: email, locale: id_ID)
securityAnswer: String @fake(type: word)
nickname: String @fake(type: word, locale:id_ID)
cashtag: String
mailingAdress: MailingAddress
ktp: KTP
isJeniusUser: Boolean @examples(values: [true, false])
}
type KTP {
name: String! @fake(type: fullName, locale:id_ID)
number: String @fake(type: internationalBankAccountNumber, locale:id_ID)
imageUrl: String @fake(type: imageUrl)
dob: String! @fake(type: pastDate)
}
type MailingAddress {
street: String @fake(type: streetAddress, locale:id_ID)
province: String
city: String @fake(type: city, locale:id_ID)
district: String
subDistric: String
zip: String @fake(type: zipCode, locale:id_ID)
}
type Query {
me(id: ID): User
contacts(id: ID): [User]
account(id: ID): Account
card(id: ID): Card
search(query: String!, scope: String!): Search
tutorial: [Tutorial]
}
type Mutation {
createUser(name: String!, email: String!): Account
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment