Skip to content
Snippets Groups Projects
Commit 58aaa766 authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

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.
parent 190a6a1e
No related branches found
No related tags found
No related merge requests found
# 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment