cm-graphql 0.0.1
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 +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +113 -0
- data/README.md +53 -0
- data/app/graphql/mutations/base_mutation.rb +8 -0
- data/app/graphql/queries/base_query.rb +4 -0
- data/app/graphql/types/enums/base/sort_column.rb +7 -0
- data/app/graphql/types/enums/base/sort_direction.rb +8 -0
- data/app/graphql/types/inputs/base/attachment.rb +15 -0
- data/app/graphql/types/inputs/base/filter.rb +15 -0
- data/app/graphql/types/inputs/base/paging.rb +14 -0
- data/app/graphql/types/inputs/base/sort.rb +15 -0
- data/app/graphql/types/objects/base/attachment_type.rb +31 -0
- data/app/graphql/types/objects/base/paging_type.rb +8 -0
- data/app/models/concerns/paginator.rb +11 -0
- data/app/models/filtered_list.rb +21 -0
- data/cm-graphql.gemspec +25 -0
- data/config/initializers/active_record_extension.rb +7 -0
- data/config/initializers/constants.rb +3 -0
- data/lib/cm-graphql/engine.rb +6 -0
- data/lib/cm-graphql.rb +5 -0
- data/lib/generators/cm_graphql/add_graphql_generator.rb +14 -0
- data/lib/generators/cm_graphql/list_api_generator.rb +16 -0
- data/lib/generators/cm_graphql/templates/graphql_schema.rb +55 -0
- data/lib/generators/cm_graphql/templates/list_type.rb +8 -0
- data/lib/generators/cm_graphql/templates/query_type.rb +16 -0
- data/lib/generators/cm_graphql/templates/record_type.rb +8 -0
- metadata +138 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 88cbec80aeb7ce0649e72b28495436a8bfd2372d564f5b593056106fb10bca8c
|
4
|
+
data.tar.gz: 90e971f56d3b41f432418bfce7652ba76c7b99bf797ae1cfef2d3a4b0aa0e7cf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 237af1356eb71878cb5d0cbc21502a3ea95828286da8b8178aaf6be061ccd12e818d4b9545d3e5e92f8a0bc620bd2849afea13bd6f9da89919a5c37058508bad
|
7
|
+
data.tar.gz: 827e8261f871b22adc627375f39b06bedc8ff7e434330dbf9d8b1919179d26ad8f8c989f8d0106f82793af0595f40864c71393c086efc74d180f1340892e04f7
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cm-graphql (0.0.1)
|
5
|
+
graphiql-rails (~> 1.8.0)
|
6
|
+
graphql (~> 1.13.1)
|
7
|
+
graphql-errors (~> 0.4.0)
|
8
|
+
graphql-rails_logger (~> 1.2.3)
|
9
|
+
kaminari (~> 1.2.2)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
remote: https://rails-assets.org/
|
14
|
+
specs:
|
15
|
+
actionpack (7.0.3.1)
|
16
|
+
actionview (= 7.0.3.1)
|
17
|
+
activesupport (= 7.0.3.1)
|
18
|
+
rack (~> 2.0, >= 2.2.0)
|
19
|
+
rack-test (>= 0.6.3)
|
20
|
+
rails-dom-testing (~> 2.0)
|
21
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
22
|
+
actionview (7.0.3.1)
|
23
|
+
activesupport (= 7.0.3.1)
|
24
|
+
builder (~> 3.1)
|
25
|
+
erubi (~> 1.4)
|
26
|
+
rails-dom-testing (~> 2.0)
|
27
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
28
|
+
activemodel (7.0.3.1)
|
29
|
+
activesupport (= 7.0.3.1)
|
30
|
+
activerecord (7.0.3.1)
|
31
|
+
activemodel (= 7.0.3.1)
|
32
|
+
activesupport (= 7.0.3.1)
|
33
|
+
activesupport (7.0.3.1)
|
34
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
35
|
+
i18n (>= 1.6, < 2)
|
36
|
+
minitest (>= 5.1)
|
37
|
+
tzinfo (~> 2.0)
|
38
|
+
builder (3.2.4)
|
39
|
+
concurrent-ruby (1.1.10)
|
40
|
+
crass (1.0.6)
|
41
|
+
erubi (1.11.0)
|
42
|
+
graphiql-rails (1.8.0)
|
43
|
+
railties
|
44
|
+
sprockets-rails
|
45
|
+
graphql (1.13.15)
|
46
|
+
graphql-errors (0.4.0)
|
47
|
+
graphql (>= 1.6.0, < 2)
|
48
|
+
graphql-rails_logger (1.2.3)
|
49
|
+
actionpack (> 5.0)
|
50
|
+
activesupport (> 5.0)
|
51
|
+
railties (> 5.0)
|
52
|
+
rouge (~> 3.0)
|
53
|
+
i18n (1.12.0)
|
54
|
+
concurrent-ruby (~> 1.0)
|
55
|
+
kaminari (1.2.2)
|
56
|
+
activesupport (>= 4.1.0)
|
57
|
+
kaminari-actionview (= 1.2.2)
|
58
|
+
kaminari-activerecord (= 1.2.2)
|
59
|
+
kaminari-core (= 1.2.2)
|
60
|
+
kaminari-actionview (1.2.2)
|
61
|
+
actionview
|
62
|
+
kaminari-core (= 1.2.2)
|
63
|
+
kaminari-activerecord (1.2.2)
|
64
|
+
activerecord
|
65
|
+
kaminari-core (= 1.2.2)
|
66
|
+
kaminari-core (1.2.2)
|
67
|
+
loofah (2.18.0)
|
68
|
+
crass (~> 1.0.2)
|
69
|
+
nokogiri (>= 1.5.9)
|
70
|
+
method_source (1.0.0)
|
71
|
+
mini_portile2 (2.8.0)
|
72
|
+
minitest (5.16.2)
|
73
|
+
nokogiri (1.13.8)
|
74
|
+
mini_portile2 (~> 2.8.0)
|
75
|
+
racc (~> 1.4)
|
76
|
+
racc (1.6.0)
|
77
|
+
rack (2.2.4)
|
78
|
+
rack-test (2.0.2)
|
79
|
+
rack (>= 1.3)
|
80
|
+
rails-dom-testing (2.0.3)
|
81
|
+
activesupport (>= 4.2.0)
|
82
|
+
nokogiri (>= 1.6)
|
83
|
+
rails-html-sanitizer (1.4.3)
|
84
|
+
loofah (~> 2.3)
|
85
|
+
railties (7.0.3.1)
|
86
|
+
actionpack (= 7.0.3.1)
|
87
|
+
activesupport (= 7.0.3.1)
|
88
|
+
method_source
|
89
|
+
rake (>= 12.2)
|
90
|
+
thor (~> 1.0)
|
91
|
+
zeitwerk (~> 2.5)
|
92
|
+
rake (13.0.6)
|
93
|
+
rouge (3.30.0)
|
94
|
+
sprockets (4.1.1)
|
95
|
+
concurrent-ruby (~> 1.0)
|
96
|
+
rack (> 1, < 3)
|
97
|
+
sprockets-rails (3.4.2)
|
98
|
+
actionpack (>= 5.2)
|
99
|
+
activesupport (>= 5.2)
|
100
|
+
sprockets (>= 3.0.0)
|
101
|
+
thor (1.2.1)
|
102
|
+
tzinfo (2.0.5)
|
103
|
+
concurrent-ruby (~> 1.0)
|
104
|
+
zeitwerk (2.6.0)
|
105
|
+
|
106
|
+
PLATFORMS
|
107
|
+
arm64-darwin-20
|
108
|
+
|
109
|
+
DEPENDENCIES
|
110
|
+
cm-graphql!
|
111
|
+
|
112
|
+
BUNDLED WITH
|
113
|
+
2.2.33
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# CmGraphql
|
2
|
+
|
3
|
+
This should help you to install graphql and setup the basics on any new rails application.
|
4
|
+
|
5
|
+
## Install
|
6
|
+
|
7
|
+
Add the gem to the Gemfile
|
8
|
+
|
9
|
+
```
|
10
|
+
gem 'cm-admin', git: 'https://github.com/commutatus/template-paging-api.git', branch: 'main'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Setup
|
14
|
+
|
15
|
+
If this is the first time graphql is getting added to the project, run the following generator
|
16
|
+
|
17
|
+
```
|
18
|
+
rails g cm_graphql:add_graphql
|
19
|
+
```
|
20
|
+
|
21
|
+
This will run the graphql generator `graphql:install` and copy the graphql schema template.
|
22
|
+
|
23
|
+
## Generator
|
24
|
+
|
25
|
+
Another generator to help you get started with a basic list endpoint is
|
26
|
+
|
27
|
+
```
|
28
|
+
rails g cm_graphql:list_api model_name
|
29
|
+
rails g cm_graphql:list_api course
|
30
|
+
```
|
31
|
+
|
32
|
+
This will add the necessary files to the application.
|
33
|
+
- course_list_type
|
34
|
+
- course_type
|
35
|
+
- course_query
|
36
|
+
|
37
|
+
Mount the engine at
|
38
|
+
```
|
39
|
+
mount CmGraphql::Engine => "/cm-graphql"
|
40
|
+
```
|
41
|
+
|
42
|
+
And you are done, you can test out the pagination.
|
43
|
+
|
44
|
+
## Explaination on how this works.
|
45
|
+
|
46
|
+
1. Kaminari Gem has `page` and `per` methods. These methods are used to set the page no and records per page of a model.
|
47
|
+
2. The paging Input type in `app/graphql/types/inputs/base/paging.rb` exposes a interface to the frontend where the frontend can enter page no and records per page.
|
48
|
+
3. The query uses a `list` method on the model. This method is inherited by the model from the paginator concern.
|
49
|
+
4. We apply the kaminari method in the list method to apply pagination to the model.
|
50
|
+
5. The paginator then calls the filtered_list model to arrange the model data and paging data in a representable way. This helps us make sure all the pagination follow the same pattern for data representation.
|
51
|
+
6. The paging_type in `app/graphql/types/objects/base/paging_type.rb` is used to represent the paging data to the frontend.
|
52
|
+
7. The pagination and model data is represented with object type in `app/graphql/types/objects/example_list_type.rb`.
|
53
|
+
8. And we have successfully applied pagination to our graphql project.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Types
|
2
|
+
module Inputs
|
3
|
+
module Base
|
4
|
+
class Attachment < Types::BaseInputObject
|
5
|
+
graphql_name "AttachmentInput"
|
6
|
+
|
7
|
+
description "Attributes needed to attach a file"
|
8
|
+
|
9
|
+
argument :filename, String, nil, required: true
|
10
|
+
argument :content, String, nil, required: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Types
|
2
|
+
module Inputs
|
3
|
+
module Base
|
4
|
+
class Filter < Types::BaseInputObject
|
5
|
+
graphql_name "BaseFilterInput"
|
6
|
+
|
7
|
+
description "Attributes needed for filtering items"
|
8
|
+
|
9
|
+
argument :ids, [Integer], nil, required: false
|
10
|
+
argument :q, String, nil, required: false
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Types
|
2
|
+
module Inputs
|
3
|
+
module Base
|
4
|
+
class Paging < Types::BaseInputObject
|
5
|
+
graphql_name "PagingInput"
|
6
|
+
|
7
|
+
description "Attributes needed for paginating list of items"
|
8
|
+
|
9
|
+
argument :page_no, Integer, nil, required: true
|
10
|
+
argument :per_page, Integer, nil, required: false
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Types
|
2
|
+
module Inputs
|
3
|
+
module Base
|
4
|
+
class Sort < Types::BaseInputObject
|
5
|
+
graphql_name "SortInput"
|
6
|
+
|
7
|
+
description "Attributes needed for sorting the list of items"
|
8
|
+
|
9
|
+
argument :column, Types::Enums::Base::SortColumn, nil, required: true
|
10
|
+
argument :direction, Types::Enums::Base::SortDirection, nil, required: true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Types::Objects::Base
|
2
|
+
class AttachmentType < Types::BaseObject
|
3
|
+
field :id, Int, nil, null: false
|
4
|
+
field :filename, String, nil, null: false
|
5
|
+
field :url, String, nil, null: false
|
6
|
+
|
7
|
+
def id
|
8
|
+
if object.class.eql?(ActiveStorage::Variant)
|
9
|
+
object.blob.id
|
10
|
+
else
|
11
|
+
object.id
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def filename
|
16
|
+
if object.class.eql?(ActiveStorage::Variant)
|
17
|
+
object.blob.filename.to_s + "-" + object.variation.transformations[:resize]
|
18
|
+
else
|
19
|
+
object.filename.to_s
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def url
|
24
|
+
if object.class.eql?(ActiveStorage::Variant)
|
25
|
+
Rails.application.routes.url_helpers.rails_representation_url(object)
|
26
|
+
else
|
27
|
+
object.service_url
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Paginator
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
module ClassMethods
|
4
|
+
def list(per_page = DEFAULT_PER_PAGE, page = nil)
|
5
|
+
paginated_list = {}
|
6
|
+
per_page = DEFAULT_PER_PAGE if per_page == 0
|
7
|
+
paginated_list[:list] = self.page(page || 1).per(per_page)
|
8
|
+
FilteredList.new(paginated_list)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class FilteredList
|
2
|
+
attr_reader :data, :facets, :paging
|
3
|
+
|
4
|
+
def initialize(paginated_list)
|
5
|
+
self.data = paginated_list[:list]
|
6
|
+
self.paging = paginated_list
|
7
|
+
end
|
8
|
+
|
9
|
+
def data=(data)
|
10
|
+
@data = []
|
11
|
+
@data = data if data.present?
|
12
|
+
end
|
13
|
+
|
14
|
+
def paging=(paginated_list)
|
15
|
+
@paging = {
|
16
|
+
total_count: paginated_list[:list].total_count,
|
17
|
+
current_page: paginated_list[:list].current_page,
|
18
|
+
total_pages: paginated_list[:list].total_pages
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
data/cm-graphql.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'cm-graphql'
|
3
|
+
spec.version = '0.0.1'
|
4
|
+
spec.date = '2022-09-14'
|
5
|
+
spec.summary = "A gem to setup grapqhl basics like pagination, file upload"
|
6
|
+
spec.description = "A gem to setup grapqhl basics like pagination, file upload"
|
7
|
+
spec.authors = ["Anbazhagan Palani"]
|
8
|
+
spec.email = 'anbu@commutatus.com'
|
9
|
+
spec.homepage =
|
10
|
+
'https://github.com/commutatus/template-paging-api'
|
11
|
+
spec.license = 'MIT'
|
12
|
+
|
13
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
14
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
|
+
end
|
16
|
+
spec.bindir = "exe"
|
17
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
|
+
spec.require_paths = ["lib"]
|
19
|
+
|
20
|
+
spec.add_runtime_dependency 'graphql', '~> 1.13.1'
|
21
|
+
spec.add_runtime_dependency 'graphql-errors', '~> 0.4.0'
|
22
|
+
spec.add_runtime_dependency 'graphql-rails_logger', '~> 1.2.3'
|
23
|
+
spec.add_runtime_dependency 'graphiql-rails', '~> 1.8.0'
|
24
|
+
spec.add_runtime_dependency 'kaminari', '~> 1.2.2'
|
25
|
+
end
|
data/lib/cm-graphql.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module CmGraphql
|
4
|
+
module Generators
|
5
|
+
class AddGraphqlGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path('templates', __dir__)
|
7
|
+
|
8
|
+
def add_graphql
|
9
|
+
generate 'graphql:install'
|
10
|
+
template 'graphql_schema.rb', "app/graphql/#{Rails.application.class.module_parent_name.underscore}_schema.rb"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module CmGraphql
|
4
|
+
module Generators
|
5
|
+
class ListApiGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path('templates', __dir__)
|
7
|
+
|
8
|
+
def add_graphql
|
9
|
+
@model_name = args.first
|
10
|
+
template "list_type.rb", "app/graphql/types/objects/#{@model_name}_list_type.rb"
|
11
|
+
template "record_type.rb", "app/graphql/types/objects/#{@model_name}_type.rb"
|
12
|
+
template "query_type.rb", "app/graphql/queries/#{@model_name}.rb"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
class <%= Rails.application.class.module_parent_name %>Schema < GraphQL::Schema
|
2
|
+
mutation(Types::MutationType)
|
3
|
+
query(Types::QueryType)
|
4
|
+
|
5
|
+
# Union and Interface Resolution
|
6
|
+
def self.resolve_type(abstract_type, obj, ctx)
|
7
|
+
# TODO: Implement this function
|
8
|
+
# to return the correct object type for `obj`
|
9
|
+
raise(GraphQL::RequiredImplementationMissingError)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Relay-style Object Identification:
|
13
|
+
|
14
|
+
# Return a string UUID for `object`
|
15
|
+
def self.id_from_object(object, type_definition, query_ctx)
|
16
|
+
# Here's a simple implementation which:
|
17
|
+
# - joins the type name & object.id
|
18
|
+
# - encodes it with base64:
|
19
|
+
# GraphQL::Schema::UniqueWithinType.encode(type_definition.name, object.id)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Given a string UUID, find the object
|
23
|
+
def self.object_from_id(id, query_ctx)
|
24
|
+
# For example, to decode the UUIDs generated above:
|
25
|
+
# type_name, item_id = GraphQL::Schema::UniqueWithinType.decode(id)
|
26
|
+
#
|
27
|
+
# Then, based on `type_name` and `id`
|
28
|
+
# find an object in your application
|
29
|
+
# ...
|
30
|
+
end
|
31
|
+
|
32
|
+
rescue_from ActiveRecord::RecordNotFound do |err, obj, args, ctx, field|
|
33
|
+
GraphQL::ExecutionError.new("#{field.type.unwrap.graphql_name} not found", extensions: {code: :unprocessable_entity, sub_code: :record_invalid, message: err.message})
|
34
|
+
end
|
35
|
+
|
36
|
+
rescue_from ActiveRecord::RecordInvalid do |err, obj, args, ctx, field|
|
37
|
+
GraphQL::ExecutionError.new(err.message, extensions: {code: :unprocessable_entity, sub_code: :record_invalid, message: err.message})
|
38
|
+
end
|
39
|
+
|
40
|
+
rescue_from BaseException do |err, obj, args, ctx, field|
|
41
|
+
GraphQL::ExecutionError.new(err.message, extensions: {code: err.code, sub_code: err.sub_code, message: err.message})
|
42
|
+
end
|
43
|
+
|
44
|
+
unless Rails.env.development?
|
45
|
+
rescue_from StandardError do |err, obj, args, ctx, field|
|
46
|
+
rollbar_error = Rollbar.error(err)
|
47
|
+
GraphQL::ExecutionError.new("Internal Server Error", extensions: {code: :internal_server_error, uuid: rollbar_error[:uuid]})
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.unauthorized_object(error)
|
52
|
+
raise Unauthorized, I18n.t("graphql.unauthorized", error_type: error.type.graphql_name)
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module Types::Objects
|
2
|
+
class <%= @model_name.titleize %>ListType < Types::BaseObject
|
3
|
+
graphql_name "<%= @model_name.titleize %>ListType"
|
4
|
+
|
5
|
+
field :paging, Types::Objects::Base::PagingType, null: true
|
6
|
+
field :data, [Types::Objects::<%= @model_name.titleize %>Type], null: false
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Queries
|
2
|
+
class <%= @model_name.titleize %> < Queries::BaseQuery
|
3
|
+
description "Fetch all or specific <%= @model_name.titleize %> detail"
|
4
|
+
|
5
|
+
type Types::Objects::<%= @model_name.titleize %>ListType, null: true
|
6
|
+
|
7
|
+
argument :paging, Types::Inputs::Base::Paging, required: false
|
8
|
+
argument :sort, Types::Inputs::Base::Sort, required: false
|
9
|
+
|
10
|
+
def resolve(paging: nil, filters: nil, sort: nil)
|
11
|
+
raise Unauthorized, I18n.t("graphql.unauthorized") if (filters && filters.my) && Current.user.nil?
|
12
|
+
::<%= @model_name.titleize %>.all.list(paging&.per_page, paging&.page_no)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cm-graphql
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anbazhagan Palani
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: graphql
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.13.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.13.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: graphql-errors
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: graphql-rails_logger
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.2.3
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.2.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: graphiql-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.8.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.8.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: kaminari
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.2.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.2.2
|
83
|
+
description: A gem to setup grapqhl basics like pagination, file upload
|
84
|
+
email: anbu@commutatus.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- Gemfile
|
90
|
+
- Gemfile.lock
|
91
|
+
- README.md
|
92
|
+
- app/graphql/mutations/base_mutation.rb
|
93
|
+
- app/graphql/queries/base_query.rb
|
94
|
+
- app/graphql/types/enums/base/sort_column.rb
|
95
|
+
- app/graphql/types/enums/base/sort_direction.rb
|
96
|
+
- app/graphql/types/inputs/base/attachment.rb
|
97
|
+
- app/graphql/types/inputs/base/filter.rb
|
98
|
+
- app/graphql/types/inputs/base/paging.rb
|
99
|
+
- app/graphql/types/inputs/base/sort.rb
|
100
|
+
- app/graphql/types/objects/base/attachment_type.rb
|
101
|
+
- app/graphql/types/objects/base/paging_type.rb
|
102
|
+
- app/models/concerns/paginator.rb
|
103
|
+
- app/models/filtered_list.rb
|
104
|
+
- cm-graphql.gemspec
|
105
|
+
- config/initializers/active_record_extension.rb
|
106
|
+
- config/initializers/constants.rb
|
107
|
+
- lib/cm-graphql.rb
|
108
|
+
- lib/cm-graphql/engine.rb
|
109
|
+
- lib/generators/cm_graphql/add_graphql_generator.rb
|
110
|
+
- lib/generators/cm_graphql/list_api_generator.rb
|
111
|
+
- lib/generators/cm_graphql/templates/graphql_schema.rb
|
112
|
+
- lib/generators/cm_graphql/templates/list_type.rb
|
113
|
+
- lib/generators/cm_graphql/templates/query_type.rb
|
114
|
+
- lib/generators/cm_graphql/templates/record_type.rb
|
115
|
+
homepage: https://github.com/commutatus/template-paging-api
|
116
|
+
licenses:
|
117
|
+
- MIT
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubygems_version: 3.2.3
|
135
|
+
signing_key:
|
136
|
+
specification_version: 4
|
137
|
+
summary: A gem to setup grapqhl basics like pagination, file upload
|
138
|
+
test_files: []
|