Browse Source

Maintenance: Add graphql generation support for production environments.

Co-authored-by: Martin Gruner <mg@zammad.com>
Rolf Schmidt 9 months ago
parent
commit
8de8c73fd2
2 changed files with 5 additions and 5 deletions
  1. 3 3
      Gemfile
  2. 2 2
      package.json

+ 3 - 3
Gemfile

@@ -200,13 +200,13 @@ gem 'pry-theme'
 # monitoring / system report
 gem 'macaddr'
 
+# watch file changes (also relevant for graphql generation in context of CDs)
+gem 'listen'
+
 # Gems used only for develop/test and not required
 # in production environments by default.
 group :development, :test do
 
-  # watch file changes
-  gem 'listen'
-
   # test frameworks
   gem 'minitest-profile', require: false
   gem 'rails-controller-testing'

+ 2 - 2
package.json

@@ -1,8 +1,8 @@
 {
   "private": true,
   "scripts": {
-    "generate-graphql-api": "RAILS_ENV=development bundle exec rails generate zammad:graphql_introspection > app/graphql/graphql_introspection.json && npx graphql-codegen -c .graphql_code_generator.js",
-    "generate-setting-types": "RAILS_ENV=development bundle exec rails generate zammad:setting_types",
+    "generate-graphql-api": "bundle exec rails generate zammad:graphql_introspection > app/graphql/graphql_introspection.json && npx graphql-codegen -c .graphql_code_generator.js",
+    "generate-setting-types": "bundle exec rails generate zammad:setting_types",
     "dev": "RAILS_ENV=development forego start -f Procfile.dev",
     "dev:https": "VITE_RUBY_HOST=0.0.0.0 VITE_RUBY_HTTPS=true RAILS_ENV=development forego start -f Procfile.dev-https",
     "i18n": "rails generate zammad:translation_catalog",