Skip to content

Commit 6c2bbe1

Browse files
committed
Add docs
1 parent 51d7c88 commit 6c2bbe1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/graphql/schema/member/has_fields.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ def self.extended(child_class)
1212
super
1313
end
1414

15+
# Create a module which will have instance methods for implementing fields.
16+
# These will be `super` methods for fields in interfaces, objects and mutations.
17+
# Use an instance variable on the class instead of a constant
18+
# so that module namespaces won't be an issue. (If we used constants,
19+
# `child_class::DefaultResolve` might find a constant from an included module.)
1520
def add_default_resolve_module(child_class)
1621
if child_class.instance_variable_get(:@_default_resolve)
1722
# This can happen when an object implements an interface,

0 commit comments

Comments
 (0)