Skip to content

Commit 16d31c1

Browse files
committed
Mark load_application_object_failed as public API
This method is documented in the guides as a public hook that can be overridden to customize error handling when loading objects via the 'loads:' argument configuration fails. Adding explicit @api public documentation to clarify this is intended for public use. Fixes #5418
1 parent 68f160f commit 16d31c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/graphql/schema/member/has_arguments.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ def authorize_application_object(argument, id, context, loaded_application_objec
413413
end
414414
end
415415

416+
# Called when an argument's `loads:` configuration fails to fetch an application object.
417+
# By default, this method raises the given error, but you can override it to handle failures differently.
418+
#
419+
# @param err [GraphQL::LoadApplicationObjectFailedError] The error that occurred
420+
# @return [Object, nil] If a value is returned, it will be used instead of the failed load
421+
# @api public
416422
def load_application_object_failed(err)
417423
raise err
418424
end

0 commit comments

Comments
 (0)