add relay environment
This commit is contained in:
12
lib/tasks/graphql.rake
Normal file
12
lib/tasks/graphql.rake
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user