graphql-docs 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/graphql-docs/parser.rb +17 -11
- data/lib/graphql-docs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9b413c4e5cbfbd07bf368c4af16f7aa77758f40
|
4
|
+
data.tar.gz: 5a8d0b56c9559b7b5f12dedfe52ac4fad47b29f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8666f6051e0fdce5b5ea7ed21cc170bcf821716006bf459bff4e260c3a403627eed62a941f777cc34c23cc9c674d45e8257b3ec05d82fdcf0ede7e90c2ba7ba
|
7
|
+
data.tar.gz: 952b01f69dbfe4422a2e7235ef34f9235e97392866d14106dc4d5e065d4c7e3864eb20cfafaad0d4af6a55eedcb2bfa266dcf8fab918a8c528647ff2668fb032
|
data/README.md
CHANGED
data/lib/graphql-docs/parser.rb
CHANGED
@@ -36,20 +36,26 @@ module GraphQLDocs
|
|
36
36
|
|
37
37
|
@processed_schema[:operation_types] << data
|
38
38
|
elsif object.name == 'Mutation'
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
@processed_schema[:operation_types] << data
|
39
|
+
data[:name] = object.name
|
40
|
+
data[:description] = object.description
|
43
41
|
|
44
|
-
|
45
|
-
h = {}
|
46
|
-
h[:name] = mutation.name
|
47
|
-
h[:description] = mutation.description
|
48
|
-
h[:input_fields], _ = fetch_fields(mutation.arguments.values.first.type.unwrap.input_fields)
|
49
|
-
h[:return_fields], _ = fetch_fields(mutation.type.unwrap.fields)
|
42
|
+
@processed_schema[:operation_types] << data
|
50
43
|
|
51
|
-
|
44
|
+
object.fields.each_value do |mutation|
|
45
|
+
h = {}
|
46
|
+
h[:name] = mutation.name
|
47
|
+
h[:description] = mutation.description
|
48
|
+
h[:input_fields], _ = fetch_fields(mutation.arguments)
|
49
|
+
|
50
|
+
return_type = mutation.type
|
51
|
+
if return_type.unwrap.respond_to?(:fields)
|
52
|
+
h[:return_fields], _ = fetch_fields(return_type.unwrap.fields)
|
53
|
+
else # it is a scalar return type
|
54
|
+
h[:return_fields], _ = fetch_fields({ "#{return_type.name}" => mutation })
|
52
55
|
end
|
56
|
+
|
57
|
+
@processed_schema[:mutation_types] << h
|
58
|
+
end
|
53
59
|
else
|
54
60
|
data[:name] = object.name
|
55
61
|
data[:description] = object.description
|
data/lib/graphql-docs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|