1234567891011121314151617181920212223 |
- module Gql::Queries
- class ApplicationBuildChecksum < BaseQuery
- description 'Checksum of the currently built front-end application. If this changes, the front-end(s) should reload.'
- type String, null: false
- def self.authorize(...)
- true
- end
- def resolve(...)
-
- return 'development-auto-build' if Rails.env.development?
- filename = Rails.public_path.join('vite/manifest.json')
- Digest::MD5.hexdigest(File.read(filename))
- end
- end
- end
|