Skip to content

Commit

Permalink
cleanup(APIv2): RHINENG-7802 get rid of GraphQL ✂️ 🚽 🔥🐧🪩🐼
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Dec 16, 2024
1 parent e962c7d commit 255b56c
Show file tree
Hide file tree
Showing 77 changed files with 130 additions and 7,069 deletions.
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ Metrics/ModuleLength:
- 'spec/**/*'

Metrics/BlockLength:
AllowedMethods: ['included', 'class_methods', 'GraphQL::ObjectType.define']
AllowedPatterns:
- 'class_methods'
- 'included'
Exclude:
- 'test/**/*'
- 'spec/**/*'
Expand Down
1 change: 0 additions & 1 deletion .simplecov
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ SimpleCov.start do

add_group 'Consumers', 'app/consumers'
add_group 'Controllers', 'app/controllers'
add_group 'GraphQL', 'app/graphql'
add_group 'Jobs', 'app/jobs'
add_group 'Models', 'app/models'
add_group 'Policies', 'app/policies'
Expand Down
6 changes: 0 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ gem 'jsonapi-serializer'
# APIv2 serializer
gem 'panko_serializer'

# GraphQL support
gem 'graphql'
gem 'graphql-batch'
gem 'graphql-fragment_cache'

# Pundit authorization system
gem 'pundit'

Expand Down Expand Up @@ -134,7 +129,6 @@ end

group :development do
gem 'bullet'
gem 'graphiql-rails'
gem 'listen', '>= 3.0.5'
gem 'pry-rails'
gem 'spring'
Expand Down
30 changes: 0 additions & 30 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ GEM
faraday-retry (2.2.1)
faraday (~> 2.0)
ffi (1.17.0)
fiber-storage (1.0.0)
friendly_id (5.2.5)
activerecord (>= 4.0.0)
fx (0.8.0)
Expand All @@ -164,17 +163,6 @@ GEM
sidekiq (~> 6.1)
globalid (1.2.1)
activesupport (>= 6.1)
graphiql-rails (1.10.1)
railties
graphql (2.3.18)
base64
fiber-storage
graphql-batch (0.6.0)
graphql (>= 1.12.18, < 3)
promise.rb (~> 0.7.2)
graphql-fragment_cache (1.20.4)
graphql (>= 2.0.0)
ruby-next (>= 0.15.0)
hashdiff (1.1.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -242,7 +230,6 @@ GEM
openscap_parser (1.6.0)
nokogiri (~> 1.6)
ostruct (0.6.0)
paco (0.2.3)
panko_serializer (0.8.2)
activesupport
oj (> 3.11.0, < 4.0.0)
Expand All @@ -254,7 +241,6 @@ GEM
pg (1.5.8)
prometheus-client-mmap (0.28.1)
rb_sys (~> 0.9)
promise.rb (0.7.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -334,7 +320,6 @@ GEM
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
require-hooks (0.2.2)
rexml (3.3.9)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
Expand Down Expand Up @@ -381,15 +366,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-next (1.0.3)
paco (~> 0.2)
require-hooks (~> 0.2)
ruby-next-core (= 1.0.3)
ruby-next-parser (>= 3.2.2.0)
unparser (~> 0.6.0)
ruby-next-core (1.0.3)
ruby-next-parser (3.2.2.0)
parser (>= 3.0.3.1)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
scenic (1.8.0)
Expand Down Expand Up @@ -436,9 +413,6 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
uniform_notifier (1.16.0)
unparser (0.6.15)
diff-lcs (~> 1.3)
parser (>= 3.3.0)
uri (0.13.1)
useragent (0.16.10)
uuid (2.3.9)
Expand Down Expand Up @@ -498,10 +472,6 @@ DEPENDENCIES
friendly_id (~> 5.2.4)
fx
gitlab-sidekiq-fetcher
graphiql-rails
graphql
graphql-batch
graphql-fragment_cache
insights-rbac-api-client (~> 2.0.0)
irb (>= 1.2)
jsonapi-serializer
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ your auditors, get alerts, and create playbooks to fix your hosts.

This project does two main things:

1. Serve as the API/GraphQL backend for the web UI
1. Serve as the API backend for the web UI
[compliance-frontend](https://github.com/RedHatInsights/compliance-frontend)
and for other consumers,
2. Connect to a Kafka message queue provided by the Insights Platform.
Expand All @@ -23,7 +23,7 @@ This project does two main things:

The Insights Compliance backend comprises of these components/services:

* Rails web server — serving REST API and GraphQL (port 3000)
* Rails web server — serving REST API (port 3000)
* Sidekiq — job runner connected through Redis (see [app/jobs](app/jobs))
* Inventory Consumer (racecar) — processor of Kafka messages,
mainly to process and parse reports
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/concerns/exception_notifier_custom_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ def prepare_exception_notifier

def extend_exception_notifier
request.env['exception_notifier.exception_data'].merge!(
current_user: current_user&.account&.org_id,
gql_op: respond_to?(:parse_gql_op, true) ? parse_gql_op : nil
current_user: current_user&.account&.org_id
)
end
end
58 changes: 0 additions & 58 deletions app/controllers/graphql_controller.rb

This file was deleted.

51 changes: 0 additions & 51 deletions app/graphql/collection_loader.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/graphql/compliance_timeout.rb

This file was deleted.

17 changes: 0 additions & 17 deletions app/graphql/concerns/fields.rb

This file was deleted.

71 changes: 0 additions & 71 deletions app/graphql/mutations/base_mutation.rb

This file was deleted.

30 changes: 0 additions & 30 deletions app/graphql/mutations/business_objective/create.rb

This file was deleted.

Loading

0 comments on commit 255b56c

Please sign in to comment.