rails-graphql-generator 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3044f10456b35da92ca114424e35da2ba575993f
4
- data.tar.gz: 5701cb9b7a8883bb6021375ea1a3fc41483ac689
3
+ metadata.gz: abf0f104118448b4b242bffe563fe30c282a9e42
4
+ data.tar.gz: 2519d5a582124bdd8067a8c7c80f692ca7878852
5
5
  SHA512:
6
- metadata.gz: 561be3a2e560815a94912380105d57c214d379a01e37637a93b9e93b1449fa6b0a728108c7de81dfe153048c975648ec4121a570587b69817aed1259a3a7a00c
7
- data.tar.gz: b0c9d5a698de7bdb68be0387379c261598b17c577619e46f12bbeceb5a30ac652c255c87d82b4f7f9704a93dfee0917caa5c26c7ab870b4f81c19b43827c03b1
6
+ metadata.gz: 7edbd271e42b8bf3ff0bea85efaf7faccfc4d7101c3d7cbd74cefae6ff4fa5e0a50d692973f41203f0d9fdcfda282efbe83b37b038f960f49be8a282dac24ef9
7
+ data.tar.gz: 02c7a18a8f8fc88a35db3b6025bfefb434c5ec94787e494f744e2a5190c683bda6d17c9294446250ad4e3b4c9ab918b259ff03b13572e6bfa53fb6930ae43172
@@ -57,8 +57,7 @@ end
57
57
 
58
58
  begin
59
59
  if models.include? association_klass.classify.constantize
60
- if circular_finder[model.to_s].include? association_klass || association_klass == model.to_s
61
- inject_into_file type_path(model), before: "# End of fields\n" do <<-FILE
60
+ inject_into_file type_path(model), before: "# End of fields\n" do <<-FILE
62
61
  field :#{ast.to_s} do
63
62
  type -> { #{model.reflect_on_association(ast).class_name}Type }
64
63
 
@@ -67,19 +66,7 @@ end
67
66
  }
68
67
  end
69
68
 
70
- FILE
71
- end
72
- else
73
- inject_into_file type_path(model), before: "# End of fields\n" do <<-FILE
74
- field :#{ast.to_s} do
75
- type -> #{model.reflect_on_association(ast).class_name}Type
76
-
77
- resolve -> (#{singular_route_key(model)}, args, ctx) {
78
- #{singular_route_key(model)}.#{ast.to_s}
79
- }
80
- end
81
- FILE
82
- end
69
+ FILE
83
70
  end
84
71
  end
85
72
  rescue => ex
@@ -9,7 +9,7 @@ class GraphQlController < ApplicationController
9
9
  variables = params[:variables]
10
10
  end
11
11
 
12
- render json: GraphQL::Query.new(RelaySchema, params[:query], variables: variables, debug: true).result
12
+ render json: GraphQL::Query.new(RelaySchema, params[:query], variables: variables).result
13
13
  end
14
14
 
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-graphql-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muhammet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-12 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails