Files
x-stake/lib/tasks/graphql.rake
2021-08-05 12:11:48 -03:00

13 lines
364 B
Ruby

# frozen_string_literal: true
namespace :graphql do
desc "Dump graphql schema to app/javascript/__generated__/schema.graphql"
task dump_schema: :environment do
File.write(
Rails.root.join("app/javascript/__generated__/schema.graphql"),
XStakeSchema.to_definition
)
puts("app/javascript/__generated__/schema.graphql updated")
end
end