hq-graphql 2.0.6 → 2.0.7

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
  SHA256:
3
- metadata.gz: 29c063cc8a29b6e30df91f11f8ed83bcaebee761fff76630bc2b2e80af9781d2
4
- data.tar.gz: cb3e76b3c272ee517fd9de9b71c65695b5379e8cd3f2a2b412edb85419b12fe3
3
+ metadata.gz: df65e3199361b5b97a2600a99ff594ba2194032a7c9f7d5553ba045264e311c4
4
+ data.tar.gz: 7ada8061fd1cb4a5f4b5f66d42d0ab9304698320001ec0a97a6e8ca5962e4860
5
5
  SHA512:
6
- metadata.gz: 992f59fa59af5c4d3d06a5902a85dde3a1839c881ac25fa15586ff8a92d15e4cde75192159a9ec0e939c286c99a2e83a2390203b84bf3de0c151bbf796945213
7
- data.tar.gz: 242640df93c46a0a1d8f1af7851bf659901b896ae8c5f2e4088ece50909fdd31ea81cd20c6809a5e24f2c965b36db74bfdcb081c18ef698b062f3fb14ad54038
6
+ metadata.gz: a83be3fbfba6ca63deffcbcb379f5f21943d542e812eda2ff6d11e37eacb522d02b63d59bb66f9f9d22d0b8a6ef4d3920fe0b884e72bda0c46ea9b5819e7f859
7
+ data.tar.gz: 03da6a427384a58b832e62119f21337b824b3129d3b2b73e7ee0a8cf79c7e6013ed04594f876aa322e631f4f0535189a0e02b88f64bd575b2f4f8cce0e1e9de7
data/lib/hq/graphql.rb CHANGED
@@ -69,5 +69,6 @@ require "hq/graphql/object"
69
69
  require "hq/graphql/resource"
70
70
  require "hq/graphql/root_mutation"
71
71
  require "hq/graphql/root_query"
72
+ require "hq/graphql/schema"
72
73
  require "hq/graphql/types"
73
74
  require "hq/graphql/engine"
@@ -34,11 +34,6 @@ module HQ
34
34
  changes
35
35
  end
36
36
 
37
- def dump_schema_to_file(directory:, filename:, schema:)
38
- ::FileUtils.mkdir_p(directory)
39
- ::File.open(::File.join(directory, filename), "w") { |file| file.write(schema.to_definition) }
40
- end
41
-
42
37
  private
43
38
 
44
39
  def convert_schema_to_string(schema)
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HQ
4
+ module GraphQL
5
+ class Schema < ::GraphQL::Schema
6
+ class << self
7
+ def dump_directory(directory = Rails.root.join("app", "graphql"))
8
+ @dump_directory ||= directory
9
+ end
10
+
11
+ def dump_filename(filename = "#{self.name.underscore}.graphql")
12
+ @dump_filename ||= filename
13
+ end
14
+
15
+ def dump
16
+ ::FileUtils.mkdir_p(dump_directory)
17
+ ::File.open(::File.join(dump_directory, dump_filename), "w") { |file| file.write(self.to_definition) }
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -3,6 +3,6 @@
3
3
 
4
4
  module HQ
5
5
  module GraphQL
6
- VERSION = "2.0.6"
6
+ VERSION = "2.0.7"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hq-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Jones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-25 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -296,6 +296,7 @@ files:
296
296
  - lib/hq/graphql/root_mutation.rb
297
297
  - lib/hq/graphql/root_query.rb
298
298
  - lib/hq/graphql/scalars.rb
299
+ - lib/hq/graphql/schema.rb
299
300
  - lib/hq/graphql/types.rb
300
301
  - lib/hq/graphql/types/object.rb
301
302
  - lib/hq/graphql/types/uuid.rb