Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2019-03-01 20:30:42 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2019-03-04 13:19:28 +0300
commit58aaa766a44b8b2105f59bf7fcc5a26447bdf286 (patch)
treec58888fa57128cb747d56c5dcebbde962a690fc5
parent190a6a1e6728ff9425154fe9ccacaa75039854c7 (diff)
Types::BaseField accepts authorize after reload
When working on files in `app/graphql` the code correctly gets autoloaded. However, the redefined `Types::BaseField` would never receive the `.accepts_definition` call, causing all queries after a reload to fail. Calling `.accepts_definition` on its superclass makes sure the reloaded version also has the `authorize` definition specified.
-rw-r--r--config/initializers/graphql.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/graphql.rb b/config/initializers/graphql.rb
index 1ed93019329..e653556231d 100644
--- a/config/initializers/graphql.rb
+++ b/config/initializers/graphql.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_key(:authorize))
-Types::BaseField.accepts_definition(:authorize)
+GraphQL::Schema::Field.accepts_definition(:authorize)