graphql-rails-api 0.7.2 → 0.7.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 604acd369144467291ab0c98d7139371958c3cfc921ee239f2bfafcc3472823b
|
4
|
+
data.tar.gz: b097612e5e1c44c88b8ea129f2e6099da4e773b87a8d6d802556bffedfc5c0c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37a0f2ad866b8aa8a9b51fe51ee140f68ea86d0c9172fc6c51b5fd0d75ede5c2facafa7a6b498df0c9afd0e90b5f977bfbf0cc4a6b0247f0436b0666beb8b130
|
7
|
+
data.tar.gz: 314e29495ca20ec06f89b7c55ab806a22fb78f2851472c9fb483004df12bbbf885621bbf6e282f717112bdb53d9fbfc1034b5635c7ac9c255079c35400970a61
|
@@ -109,17 +109,17 @@ class GraphqlAddFieldsGenerator < Rails::Generators::NamedBase
|
|
109
109
|
def add_has_many_fields_to_type(field, resource)
|
110
110
|
file_name = "app/graphql/#{field.pluralize}/type.rb"
|
111
111
|
if File.read(file_name).include?("field :#{resource.singularize}_ids") ||
|
112
|
-
File.read(file_name).include?("field :#{resource.pluralize}")
|
113
|
-
File.read(file_name).include?("connection :#{resource.pluralize}_connection")
|
112
|
+
File.read(file_name).include?("field :#{resource.pluralize}")
|
114
113
|
return
|
115
114
|
end
|
116
115
|
|
117
116
|
write_at(
|
118
117
|
file_name, 4,
|
119
118
|
<<-STRING
|
120
|
-
field :#{resource.singularize}_ids, types[#{@id_type}]
|
119
|
+
field :#{resource.singularize}_ids, types[#{@id_type}] do
|
120
|
+
resolve CollectionIdsResolver
|
121
|
+
end
|
121
122
|
field :#{resource.pluralize}, types[#{resource.pluralize.camelize}::Type]
|
122
|
-
connection :#{resource.pluralize}_connection, #{resource.pluralize.camelize}::Connection
|
123
123
|
STRING
|
124
124
|
)
|
125
125
|
|
@@ -32,7 +32,7 @@ class GraphqlResourceGenerator < Rails::Generators::NamedBase
|
|
32
32
|
generate_graphql_type(@resource) if options.graphql_type?
|
33
33
|
|
34
34
|
# Graphql Connection
|
35
|
-
generate_graphql_connection(@resource) if options.connection?
|
35
|
+
# generate_graphql_connection(@resource) if options.connection?
|
36
36
|
|
37
37
|
# Model
|
38
38
|
generate_model(@resource) if options.model?
|
@@ -167,15 +167,15 @@ class GraphqlResourceGenerator < Rails::Generators::NamedBase
|
|
167
167
|
file_name = "app/graphql/#{field.pluralize}/type.rb"
|
168
168
|
if File.read(file_name).include?("field :#{resource.singularize}_ids") ||
|
169
169
|
File.read(file_name).include?("field :#{resource.pluralize}") ||
|
170
|
-
File.read(file_name).include?("connection :#{resource.pluralize}_connection")
|
171
170
|
return
|
172
171
|
end
|
173
172
|
write_at(
|
174
173
|
file_name, 4,
|
175
174
|
<<-STRING
|
176
|
-
field :#{resource.singularize}_ids, types[#{@id_type}]
|
175
|
+
field :#{resource.singularize}_ids, types[#{@id_type}] do
|
176
|
+
resolve CollectionIdsResolver
|
177
|
+
end
|
177
178
|
field :#{resource.pluralize}, types[#{resource.pluralize.camelize}::Type]
|
178
|
-
connection :#{resource.pluralize}_connection, #{resource.pluralize.camelize}::Connection
|
179
179
|
STRING
|
180
180
|
)
|
181
181
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-rails-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- poilon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -42,22 +42,22 @@ dependencies:
|
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '5.2'
|
48
45
|
- - ">="
|
49
46
|
- !ruby/object:Gem::Version
|
50
|
-
version: 5.2.
|
47
|
+
version: 5.2.1
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 5.2.1
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '5.2'
|
58
55
|
- - ">="
|
59
56
|
- !ruby/object:Gem::Version
|
60
|
-
version: 5.2.
|
57
|
+
version: 5.2.1
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 5.2.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rkelly-remix
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
|
118
|
-
rubygems_version: 2.7.6
|
117
|
+
rubygems_version: 3.0.4
|
119
118
|
signing_key:
|
120
119
|
specification_version: 4
|
121
120
|
summary: Graphql rails api framework to create easily graphql api with rails
|