graphiform 0.2.5 → 0.2.6

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: 2f56c92956905df19b6e8a756b8826c63710619ab9c67f5e019280ccca4c0cd5
4
- data.tar.gz: 6ac0fbb69feaa5d7a544dc1c5618f7c09b9cfd09fa6a0ad498e139e2c7539547
3
+ metadata.gz: 7499ef9e7181b749ac563666f65231e933d047bbdcc39dbe6f708bdb14e8eab9
4
+ data.tar.gz: 3fc690f7cb20996f420516cceb158ff9aa103b2b7ed1e7bae6ceead0864f4409
5
5
  SHA512:
6
- metadata.gz: 8fe2ea6fc9d0c5bd906357d7571b2aa187c247a2fccd573716da623e22f784c3aaf4337fae660ec5b30061a40af57ac99f2cd1ec68b93c35cf06b8098196da3d
7
- data.tar.gz: ee62442607c271725f12401d2d27f89667ef3992c41e7e09935809e5c2ee77c8aa99986d69a60ddacb7b0ab439717a47dd803a7579f3749514fca572fc440b15
6
+ metadata.gz: 7037e930060d081d86091b0c023fb3b3813b6a487bbe19785ebde5f6824eae27210839eb4174e5ea47f3499464aa346609ffc76838ab5c814063b754fa44393b
7
+ data.tar.gz: b41292d3ab6b29c3ab9a2eaa8e02c1743f14095ccc88396e3e6602fb1d8e6964b8576885cb95d0006c88509a7befd54450415ce407e0ed31b4bc9f4eeaa38406
@@ -5,6 +5,7 @@ require 'graphiform/skeleton'
5
5
  require 'graphiform/active_record_helpers'
6
6
  require 'graphiform/core'
7
7
  require 'graphiform/fields'
8
+ require 'graphiform/sort_enum'
8
9
 
9
10
  module Graphiform
10
11
  def self.included(base)
@@ -157,7 +157,7 @@ module Graphiform
157
157
  column_def = column(as || name)
158
158
  association_def = association(as || name)
159
159
 
160
- type = ::Enums::Sort if column_def.present?
160
+ type = ::Graphiform::SortEnum if column_def.present?
161
161
  type = association_def.klass.graphql_sort if Helpers.association_arguments_valid?(association_def, :graphql_sort)
162
162
 
163
163
  return if type.blank?
@@ -80,12 +80,5 @@ module Graphiform
80
80
  Helpers.get_const_or_create('BaseEnum', ::Enums) do
81
81
  Class.new(::GraphQL::Schema::Enum)
82
82
  end
83
-
84
- Helpers.get_const_or_create('Sort', ::Enums) do
85
- Class.new(::Enums::BaseEnum) do
86
- value 'ASC', 'Sort results in ascending order'
87
- value 'DESC', 'Sort results in descending order'
88
- end
89
- end
90
83
  end
91
84
  end
@@ -0,0 +1,8 @@
1
+ require 'graphql'
2
+
3
+ module Graphiform
4
+ class SortEnum < ::GraphQL::Schema::Enum
5
+ value 'ASC', 'Sort results in ascending order'
6
+ value 'DESC', 'Sort results in descending order'
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Graphiform
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jayce.pulsipher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-02 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -124,6 +124,7 @@ files:
124
124
  - lib/graphiform/fields.rb
125
125
  - lib/graphiform/helpers.rb
126
126
  - lib/graphiform/skeleton.rb
127
+ - lib/graphiform/sort_enum.rb
127
128
  - lib/graphiform/version.rb
128
129
  - lib/tasks/graphiform_tasks.rake
129
130
  homepage: https://github.com/3-form/graphiform