diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-03-01 18:30:42 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-03-04 11:19:28 +0100 |
commit | 58aaa766a44b8b2105f59bf7fcc5a26447bdf286 (patch) | |
tree | c58888fa57128cb747d56c5dcebbde962a690fc5 /config | |
parent | 190a6a1e6728ff9425154fe9ccacaa75039854c7 (diff) | |
download | gitlab-ce-58aaa766a44b8b2105f59bf7fcc5a26447bdf286.tar.gz |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/graphql.rb | 2 |
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) |