Skip to content

Commit 7f72756

Browse files
committed
requiredTypes.graphql -> requiredTypes.js, npm does not like me
1 parent 079b3aa commit 7f72756

File tree

3 files changed

+103
-7
lines changed

3 files changed

+103
-7
lines changed

Diff for: src/schema/buildRequiredTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import path from 'path';
99
*/
1010

1111
export function buildRequiredTypes(pathToFile: string): any {
12-
const filePath = path.join(__dirname, pathToFile || 'requiredTypes.graphql');
12+
// for any reason npm install always forgets to install the .graphql file
13+
const filePath = path.join(__dirname, pathToFile || 'requiredTypes.js');
1314
return readString(filePath);
1415
}

Diff for: src/schema/requiredTypes.js

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Direction sets the sort order: Ascending (ASC) = default, Descending (DESC)
2+
enum Direction {
3+
# ascending order
4+
ASC
5+
6+
# descending order
7+
DESC
8+
}
9+
10+
# Regex Type provides access to regular expressions
11+
input Regex {
12+
# Regular Expression: Without the /, but you can use ^ and $
13+
regex: String!
14+
15+
# Regular Expression: Options
16+
options: [RegexOptions!]
17+
}
18+
19+
# RegexOptions provides options, how to run the regular expression
20+
enum RegexOptions {
21+
# global: Don't restart after first match
22+
global
23+
24+
# multiline: ^ and $ match start/end of line
25+
multiline
26+
27+
# insensitive: Case insensitive match
28+
insensitive
29+
30+
# sticky: Proceed matching from where previous match ended only
31+
sticky
32+
33+
# unicode: Match with full unicode
34+
unicode
35+
}
36+
37+
enum BSONType {
38+
# Double 1 "double"
39+
double
40+
41+
# String 2 "string"
42+
string
43+
44+
# Object 3 "object"
45+
object
46+
47+
# Array 4 "array"
48+
array
49+
50+
# Binary data 5 "binData"
51+
binData
52+
53+
# Undefined 6 "undefined" Deprecated
54+
undefined
55+
56+
# ObjectId 7 "objectId"
57+
objectId
58+
59+
# Boolean 8 "bool"
60+
bool
61+
62+
# Date 9 "date"
63+
date
64+
65+
# Null 10 "null"
66+
null
67+
68+
# Regular Expression 11 "regex"
69+
regex
70+
71+
# DBPointer 12 "dbPointer" Deprecated
72+
dbPointer
73+
74+
# JavaScript 13 "javascript"
75+
javascript
76+
77+
# Symbol 14 "symbol" Deprecated
78+
symbol
79+
80+
# JavaScript (with scope) 15 "javascriptWithScope"
81+
javascriptWithScope
82+
83+
# 32-bit integer 16 "int"
84+
int
85+
86+
# Timestamp 17 "timestamp"
87+
timestamp
88+
89+
# 64-bit integer 18 "long"
90+
long
91+
92+
# Decimal128 19 "decimal"
93+
decimal
94+
95+
# Min key -1 "minKey"
96+
minKey
97+
98+
# Max key 127 "maxKey"
99+
maxKey
100+
}

Diff for: src/util/graphql.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ export function buildName(name) {
3333
return { kind: 'Name', value: name };
3434
}
3535

36-
export function buildTypeDefinition(
37-
name,
38-
fields,
39-
kind,
40-
values
41-
) {
36+
export function buildTypeDefinition(name, fields, kind, values) {
4237
return {
4338
kind: kind || 'ObjectTypeDefinition',
4439
name: buildName(name),

0 commit comments

Comments
 (0)