-
-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathschemas.ts
More file actions
87 lines (76 loc) · 1.44 KB
/
schemas.ts
File metadata and controls
87 lines (76 loc) · 1.44 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Common GraphQL schema strings shared across multiple spec files.
// Use these constants instead of re-declaring identical schema strings per test.
export const PRIMITIVE_NON_NULL_SCHEMA = /* GraphQL */ `
input PrimitiveInput {
a: ID!
b: String!
c: Boolean!
d: Int!
e: Float!
}
`;
export const PRIMITIVE_NULLABLE_SCHEMA = /* GraphQL */ `
input PrimitiveInput {
a: ID
b: String
c: Boolean
d: Int
e: Float
z: String! # no defined check
}
`;
export const ARRAY_INPUT_SCHEMA = /* GraphQL */ `
input ArrayInput {
a: [String]
b: [String!]
c: [String!]!
d: [[String]]
e: [[String]!]
f: [[String]!]!
}
`;
export const REF_INPUT_SCHEMA = /* GraphQL */ `
input AInput {
b: BInput!
}
input BInput {
c: CInput!
}
input CInput {
a: AInput!
}
`;
export const NESTED_INPUT_SCHEMA = /* GraphQL */ `
input NestedInput {
child: NestedInput
childrens: [NestedInput]
}
`;
export const ENUM_SCHEMA = /* GraphQL */ `
enum PageType {
PUBLIC
BASIC_AUTH
}
input PageInput {
pageType: PageType!
}
`;
export const CAMELCASE_SCHEMA = /* GraphQL */ `
input HTTPInput {
method: HTTPMethod
url: URL!
}
enum HTTPMethod {
GET
POST
}
scalar URL # unknown scalar, should be any (definedNonNullAnySchema)
`;
export const SCALARS_SCHEMA = /* GraphQL */ `
input Say {
phrase: Text!
times: Count!
}
scalar Count
scalar Text
`;