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 +4 -4
- data/lib/graphiform.rb +1 -0
- data/lib/graphiform/fields.rb +1 -1
- data/lib/graphiform/skeleton.rb +0 -7
- data/lib/graphiform/sort_enum.rb +8 -0
- data/lib/graphiform/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7499ef9e7181b749ac563666f65231e933d047bbdcc39dbe6f708bdb14e8eab9
|
4
|
+
data.tar.gz: 3fc690f7cb20996f420516cceb158ff9aa103b2b7ed1e7bae6ceead0864f4409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7037e930060d081d86091b0c023fb3b3813b6a487bbe19785ebde5f6824eae27210839eb4174e5ea47f3499464aa346609ffc76838ab5c814063b754fa44393b
|
7
|
+
data.tar.gz: b41292d3ab6b29c3ab9a2eaa8e02c1743f14095ccc88396e3e6602fb1d8e6964b8576885cb95d0006c88509a7befd54450415ce407e0ed31b4bc9f4eeaa38406
|
data/lib/graphiform.rb
CHANGED
data/lib/graphiform/fields.rb
CHANGED
@@ -157,7 +157,7 @@ module Graphiform
|
|
157
157
|
column_def = column(as || name)
|
158
158
|
association_def = association(as || name)
|
159
159
|
|
160
|
-
type = ::
|
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?
|
data/lib/graphiform/skeleton.rb
CHANGED
@@ -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
|
data/lib/graphiform/version.rb
CHANGED
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.
|
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-
|
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
|