graphql-docs 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/graphql-docs/helpers.rb +10 -10
- data/lib/graphql-docs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4d60df082629a2051e1f56910ae53e15ac0c2f4
|
|
4
|
+
data.tar.gz: abde3dbad6ce9687c95a31d2312fb98fedff8067
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b97023604cff348beee6cbb17fd5175879232d7ac7fdae05711d0ff3cf0e640e97a2a2b78954ec1a4624cdda2ed47e4f183381b6cc21e2badf3065e8db575d4
|
|
7
|
+
data.tar.gz: c85ba82b15abdd9f46852e19b96e56e4324ccf28b1c2671be7eb65b5017642458003d88767179c07e21e861342ba345feb478596e9b2f224488bbe9b5e285d36
|
data/lib/graphql-docs/helpers.rb
CHANGED
|
@@ -26,40 +26,40 @@ module GraphQLDocs
|
|
|
26
26
|
type_name = ''
|
|
27
27
|
|
|
28
28
|
if field['type']['kind'] == 'NON_NULL'
|
|
29
|
-
type_name << '!'
|
|
30
|
-
|
|
31
29
|
if !field['type']['ofType']['ofType'].nil?
|
|
32
30
|
# we're going to be a list...but what kind?!
|
|
33
31
|
type_name << '['
|
|
34
32
|
if !field['type']['ofType']['ofType']['ofType'].nil?
|
|
35
|
-
# A required list of required items: ![!Blah]
|
|
36
|
-
if field['type']['ofType']['ofType']['kind'] == 'NON_NULL'
|
|
37
|
-
type_name << '!'
|
|
38
|
-
end
|
|
39
33
|
type_path = field['type']['ofType']['ofType']['ofType']['kind']
|
|
40
34
|
type_name << field['type']['ofType']['ofType']['ofType']['name']
|
|
41
35
|
name_slug = field['type']['ofType']['ofType']['ofType']['name']
|
|
36
|
+
# A required list of required items: [Blah!]!
|
|
37
|
+
if field['type']['ofType']['ofType']['kind'] == 'NON_NULL'
|
|
38
|
+
type_name << '!'
|
|
39
|
+
end
|
|
42
40
|
else
|
|
43
|
-
# A required list of non-required items:
|
|
41
|
+
# A required list of non-required items: [Blah]!
|
|
44
42
|
type_path = field['type']['ofType']['ofType']['kind']
|
|
45
43
|
type_name << field['type']['ofType']['ofType']['name']
|
|
46
44
|
name_slug = field['type']['ofType']['ofType']['name']
|
|
47
45
|
end
|
|
48
46
|
type_name << ']'
|
|
47
|
+
type_name << '!'
|
|
49
48
|
else
|
|
50
|
-
# Simple non-null item: !Blah
|
|
51
49
|
type_path = field['type']['ofType']['kind']
|
|
52
50
|
type_name << field['type']['ofType']['name']
|
|
53
51
|
name_slug = field['type']['ofType']['name']
|
|
52
|
+
# Simple non-null item: Blah!
|
|
53
|
+
type_name << '!'
|
|
54
54
|
end
|
|
55
55
|
elsif field['type']['kind'] == 'LIST'
|
|
56
56
|
type_name << '['
|
|
57
57
|
if field['type']['ofType']['kind'] == 'NON_NULL'
|
|
58
|
-
# Nullable list of non-null items: [!Blah]
|
|
59
|
-
type_name << '!'
|
|
60
58
|
type_path = field['type']['ofType']['ofType']['kind']
|
|
61
59
|
type_name << field['type']['ofType']['ofType']['name']
|
|
62
60
|
name_slug = field['type']['ofType']['ofType']['name']
|
|
61
|
+
# Nullable list of non-null items: [Blah!]
|
|
62
|
+
type_name << '!'
|
|
63
63
|
else
|
|
64
64
|
# Nullable list of nullable items: [Blah]
|
|
65
65
|
type_path = field['type']['ofType']['kind']
|
data/lib/graphql-docs/version.rb
CHANGED