-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
53 lines (45 loc) · 1.05 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"CAPITALIZE ALL LETTERS IN STRING"
directive @uppercase on FIELD | FIELD_DEFINITION
scalar FieldSet
directive @plusX(x: Int!) on FIELD | FIELD_DEFINITION
directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
type Query {
account(id: ID!): Account
sum: Int @plusX(x: 7)
dynamicSum(x: Int!, y: Int!): Int @plusX(x: 4)
addHour(date: DateTime!): DateTime
}
interface Node {
id: ID!
}
type Account implements Node @key(fields: "id") {
id: ID!
number: String! @uppercase
currency: Currency!
transactions: [Transaction!]!
}
type Transaction implements Node @key(fields: "id") {
id: ID!
amount: Int!
ups: String
createdAt: DateTime
status: TransactionStatus!
}
type NamedCurrency implements Node {
id: ID!
name: String!
}
type CodedCurrency implements Node {
id: ID!
code: Int!
}
union Currency = NamedCurrency | CodedCurrency
"TRANSACTION STATUS DOC"
enum TransactionStatus {
NEW
"SUCCESS DOC"
SUCCESS
FAIL
}
scalar DateTime
scalar HelloWorld