Skip to content

Commit 38c081b

Browse files
committed
Move constant to top
1 parent 37d45e8 commit 38c081b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/graphql/schema/field.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class Field
88
include GraphQL::Schema::Member::HasArguments
99
include GraphQL::Schema::Member::HasPath
1010

11+
CONTEXT_EXTRAS = [:path]
12+
1113
# @return [String] the GraphQL name for this field, camelized unless `camelize: false` is provided
1214
attr_reader :name
1315
alias :graphql_name :name
@@ -407,7 +409,6 @@ def apply_scope(value, ctx)
407409
end
408410

409411
# @param ctx [GraphQL::Query::Context::FieldResolutionContext]
410-
CONTEXT_EXTRAS = [:path]
411412
def fetch_extra(extra_name, ctx)
412413
if !CONTEXT_EXTRAS.include?(extra_name) && respond_to?(extra_name)
413414
self.public_send(extra_name)

0 commit comments

Comments
 (0)