add relay environment

This commit is contained in:
João Geonizeli
2021-08-05 12:11:48 -03:00
parent 5048dea211
commit 1feaf5579e
10 changed files with 593 additions and 76 deletions

12
lib/tasks/graphql.rake Normal file
View 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