Merge pull request #200 from github/constant-directives
Remove a dynamically defined method
This commit is contained in:
Коммит
8ceb5ce90d
|
@ -52,6 +52,13 @@ module GraphQL
|
|||
const_set(class_name, klass)
|
||||
end
|
||||
|
||||
DIRECTIVES = { include: IncludeDirective,
|
||||
skip: SkipDirective }.freeze
|
||||
|
||||
def directives
|
||||
DIRECTIVES
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def normalize_type_name(type_name)
|
||||
|
@ -76,11 +83,6 @@ module GraphQL
|
|||
end
|
||||
end
|
||||
|
||||
directives = {}
|
||||
mod.define_singleton_method(:directives) { directives }
|
||||
directives[:include] = IncludeDirective
|
||||
directives[:skip] = SkipDirective
|
||||
|
||||
mod
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче