From 96d1666899ce4faa70f817faceedd7f89f36bae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Tue, 8 Jan 2019 15:15:36 +0100 Subject: [PATCH] Initialize graphql after application initialization Proposal, Debate and Comment "globalize_accessors" class method were loaded before application available locales initialization because of graphql initializer. This will cause unexpected translation errors at any translatable classes declared at graphql api definition (api.yml). Doing GraphQL initialization after application initialization should solve this issue. --- config/initializers/graphql.rb | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 config/initializers/graphql.rb diff --git a/config/initializers/graphql.rb b/config/initializers/graphql.rb deleted file mode 100644 index 15a5a95cf..000000000 --- a/config/initializers/graphql.rb +++ /dev/null @@ -1,4 +0,0 @@ -if ActiveRecord::Base.connection.tables.any? - api_config = YAML.load_file("./config/api.yml") - API_TYPE_DEFINITIONS = GraphQL::ApiTypesCreator::parse_api_config_file(api_config) -end