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.
This commit is contained in:
Senén Rodero Rodríguez
2019-01-08 15:15:36 +01:00
committed by voodoorai2000
parent 0ffb52257f
commit 96d1666899

View File

@@ -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