graphql-client 0.0.16 → 0.0.17

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
  SHA1:
3
- metadata.gz: 5a3719a5d2029f941778b24cd87f72a79fefc1d8
4
- data.tar.gz: 3698a12695761dba8645fc0d7d9379d46afe3f76
3
+ metadata.gz: e9b2195df68c75f3e35df1743e261cda5bc934ef
4
+ data.tar.gz: 6237bcd64f458d5e53ad51be00fabdc300c0c703
5
5
  SHA512:
6
- metadata.gz: f37c34289022b6b7e73c5b547a404bed7d02c068e48913abea61021e420311a03ac1ff233fbc01cf0c2d40589d63536091467248b014435ba1f0fa653d4c9438
7
- data.tar.gz: 18d6685fa2b2e20340d8844dbb6d2e30f6049d4bcc2341561047fbd65749db0143c7e12aec4788b85b91018fba0090e96697b6e91e5987cffa4304f6a27772c7
6
+ metadata.gz: 94a2e1f990da224f3c5e7e6ead39e92311250b7b4253d13a47eb2c099419542164fad8d702beb665ab83da93d851ada9a5ea3b0daa58c902e713e34ff632cf6c
7
+ data.tar.gz: 8c560ea11b8f3f46d97a3f4f3cacf53369baa969adc869e05c79cee2353d882ba14275e1b5e67a66a4d4abbc61fa9f5e609248ba70a2d5f3117b59d185226d4b
@@ -1,5 +1,6 @@
1
1
  require "graphql"
2
2
  require "graphql/client"
3
+ require "graphql/client/log_subscriber"
3
4
  require "rails/railtie"
4
5
 
5
6
  module GraphQL
@@ -22,10 +23,14 @@ module GraphQL
22
23
 
23
24
  initializer "graphql.configure_views_namespace" do |app|
24
25
  require "graphql/client/view_module"
26
+
27
+ path = app.paths["app/views"].first
28
+ client = config.graphql.client
29
+
25
30
  Object.const_set(:Views, Module.new {
26
31
  extend GraphQL::Client::ViewModule
27
- self.path = "#{app.root}/app/views"
28
- self.client = config.graphql.client
32
+ self.path = path
33
+ self.client = client
29
34
  })
30
35
  end
31
36
  end
@@ -116,6 +116,7 @@ module GraphQL
116
116
  if File.extname(path) == ".erb"
117
117
  contents = File.read(path)
118
118
  query = GraphQL::Client::Erubis.extract_graphql_sections(contents)
119
+ # TODO: Use generic client parser
119
120
  mod = client.parse(query) if query
120
121
  end
121
122
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub